[Pkg-privacy-commits] [tails-installer] 24/43: WIP: try to get a fresh system_partition object after changing its type.

Ulrike Uhlig u-guest at moszumanska.debian.org
Tue Nov 15 23:30:21 UTC 2016


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

u-guest pushed a commit to branch debian/sid
in repository tails-installer.

commit b7f6014d7406ee7edd6d8697aad535e975598cc6
Author: intrigeri <intrigeri at boum.org>
Date:   Wed Jul 20 08:58:08 2016 +0000

    WIP: try to get a fresh system_partition object after changing its type.
---
 tails_installer/creator.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tails_installer/creator.py b/tails_installer/creator.py
index 0f81b74..25401f9 100755
--- a/tails_installer/creator.py
+++ b/tails_installer/creator.py
@@ -884,6 +884,19 @@ class LinuxTailsInstallerCreator(TailsInstallerCreator):
         # XXX: sometimes fails (https://labs.riseup.net/code/issues/10987)
         system_partition.call_set_type_sync(ESP_GUID, GLib.Variant('a{sv}', None))
 
+        # XXX: let's try to get a fresh system_partition object
+        # (https://labs.riseup.net/code/issues/10720#note-28)
+        # This code duplicates some code we have above, so if this works,
+        # we'll want to refactor.
+        self.flush_buffers(silent=True)
+        time.sleep(5)
+        block.call_rescan_sync(GLib.Variant('a{sv}', None))
+        obj = self._get_object(self.drive['udi'])
+        partition_table = obj.props.partition_table
+        partitions = self._udisksclient.get_partitions(partition_table)
+        self.log.debug("partitions: %(partitions)s" % {'partitions': partitions})
+        system_partition = partitions[0]
+
         self._set_partition_flags(system_partition, SYSTEM_PARTITION_FLAGS)
 
     def update_system_partition_properties(self):

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