[Pkg-privacy-commits] [tails-installer] 159/210: Initial commit for the Mac backend

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:26:40 UTC 2017


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to tag 3.90.0
in repository tails-installer.

commit ff080e02f45b9f609d95a834e7f3950363c9ca87
Author: Martin Briza <mbriza at redhat.com>
Date:   Mon Sep 7 14:40:22 2015 +0200

    Initial commit for the Mac backend
---
 liveusb/__init__.py |  6 ++++-
 liveusb/creator.py  | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+), 1 deletion(-)

diff --git a/liveusb/__init__.py b/liveusb/__init__.py
index 842b4c6..62eb128 100644
--- a/liveusb/__init__.py
+++ b/liveusb/__init__.py
@@ -41,7 +41,11 @@ from liveusb.creator import LiveUSBError
 
 if sys.platform == "win32":
     from liveusb.creator import WindowsLiveUSBCreator as LiveUSBCreator
-else:
+elif sys.platform.startswith("linux"):
     from liveusb.creator import LinuxLiveUSBCreator as LiveUSBCreator
+elif sys.platform == "darwin":
+    from liveusb.creator import MacOsUSBCreator as LiveUSBCreator
+else:
+    from liveusb.creator import LiveUSBCreator as LiveUSBCreator
 
 __all__ = ("LiveUSBCreator", "LiveUSBError", "LiveUSBWindow", "_", "utf8_gettext")
diff --git a/liveusb/creator.py b/liveusb/creator.py
index c3e16aa..8d3ed3e 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -1129,6 +1129,73 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
         return version
 
 
+
+class MacOsLiveUSBCreator(object):
+
+    def detect_removable_drives(self, callback=None):
+        """ This method should populate self.drives with removable devices """
+        pass
+
+    def verify_filesystem(self):
+        """
+        Verify the filesystem of our device, setting the volume label
+        if necessary.  If something is not right, this method throws a
+        LiveUSBError.
+        """
+        pass
+
+    def get_free_bytes(self, drive=None):
+        """ Return the number of free bytes on a given drive.
+
+        If drive is None, then use the currently selected device.
+        """
+        pass
+
+    def extract_iso(self):
+        """ Extract the LiveCD ISO to the USB drive """
+        pass
+
+    def verify_iso_md5(self):
+        """ Verify the MD5 checksum of the ISO """
+        pass
+
+    def terminate(self):
+        """ Terminate any subprocesses that we have spawned """
+        pass
+
+    def mount_device(self):
+        """ Mount self.drive, setting the mount point to self.mount """
+        pass
+
+    def unmount_device(self):
+        """ Unmount the device mounted at self.mount """
+        pass
+
+    def get_proxies(self):
+        """ Return a dictionary of proxy settings """
+        pass
+
+    def bootable_partition(self):
+        """ Ensure that the selected partition is flagged as bootable """
+        pass
+
+    def get_mbr(self):
+        pass
+
+    def blank_mbr(self):
+        pass
+
+    def reset_mbr(self):
+        pass
+
+    def flush_buffers(self):
+        """ Flush filesystem buffers """
+        pass
+
+    def is_admin(self):
+        return os.getuid() == 0
+
+
 class WindowsLiveUSBCreator(LiveUSBCreator):
 
     def detect_removable_drives(self, callback=None):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list