[Pkg-privacy-commits] [tails-installer] 06/12: Set the partition type again after settings its flags (refs: #14809).

Ulrike Uhlig ulrike at moszumanska.debian.org
Mon Nov 20 14:55:35 UTC 2017


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

ulrike pushed a commit to annotated tag tails-installer_5.0.2
in repository tails-installer.

commit d9b284ae6d6b32e1583caae93ad6c7a81316219e
Author: intrigeri <intrigeri at boum.org>
Date:   Sun Oct 8 07:48:16 2017 +0000

    Set the partition type again after settings its flags (refs: #14809).
    
    This workarounds the fact that calling _set_partition_flags resets the type of
    the partition with udisks2 2.7.3-4, which breaks UEFI boot.
---
 tails_installer/creator.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tails_installer/creator.py b/tails_installer/creator.py
index 0188e2c..2e8b859 100755
--- a/tails_installer/creator.py
+++ b/tails_installer/creator.py
@@ -886,13 +886,6 @@ class LinuxTailsInstallerCreator(TailsInstallerCreator):
         self.rescan_block_device(self._get_object().props.block)
         system_partition = self.first_partition(self.drive['udi'])
 
-        # Sets the partition type that is not set by call_create_partition_sync...
-        # because it is not implemented in UDisks as of version 2.1.5 (see
-        # http://cgit.freedesktop.org/udisks/tree/src/udiskslinuxpartitiontable.c?id=a66691c3#n630)
-        #
-        # XXX: sometimes fails (https://labs.riseup.net/code/issues/10987)
-        system_partition.call_set_type_sync(ESP_GUID, GLib.Variant('a{sv}', None))
-
         # Get a fresh system_partition object, otherwise
         # _set_partition_flags sometimes fails with
         # "GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No
@@ -901,9 +894,15 @@ class LinuxTailsInstallerCreator(TailsInstallerCreator):
         self.rescan_block_device(self._get_object().props.block)
         system_partition = self.first_partition(self.drive['udi'])
 
+        # XXX: This resets the partition type for some reason.
         # XXX: sometimes fails (https://labs.riseup.net/code/issues/10987)
         self._set_partition_flags(system_partition, SYSTEM_PARTITION_FLAGS)
 
+        # _set_partition_flags resets the partition type with udisks2 2.7.3-4,
+        # so let's set the right one again
+        # XXX: sometimes fails (https://labs.riseup.net/code/issues/10987)
+        system_partition.call_set_type_sync(ESP_GUID, GLib.Variant('a{sv}', None))
+
         # Give the system some more time to recognize the updated
         # partition, otherwise sometimes later on, when
         # switch_drive_to_system_partition is called, it calls

-- 
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