installer-bug15432.patch 1.79 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
diff --git a/usr/lib/python2.7/dist-packages/tails_installer/creator.py b/usr/lib/python2.7/dist-packages/tails_installer/creator.py
index ff47356..2a949ae 100755
--- a/usr/lib/python2.7/dist-packages/tails_installer/creator.py
+++ b/usr/lib/python2.7/dist-packages/tails_installer/creator.py
@@ -899,12 +899,6 @@ class LinuxTailsInstallerCreator(TailsInstallerCreator):
             else:
                 raise
 
-        # Rescan the device as it seems this is not always done automatically.
-        # And get the new object after the rescan, then its 1st partition
-        # which is the one we just created on our new partition table.
-        self.rescan_block_device(self._get_object().props.block)
-        system_partition = self.first_partition(self.drive['udi'])
-
         # Get a fresh system_partition object, otherwise
         # _set_partition_flags sometimes fails with
         # "GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No
@@ -918,6 +912,14 @@ class LinuxTailsInstallerCreator(TailsInstallerCreator):
         # XXX: sometimes fails (https://labs.riseup.net/code/issues/10987)
         self._set_partition_flags(system_partition, SYSTEM_PARTITION_FLAGS)
 
+        # Get a fresh system_partition object, otherwise
+        # call_set_flags_sync sometimes fails with "No such interface
+        # 'org.freedesktop.UDisks2.Partition' on object at path
+        # /org/freedesktop/UDisks2/block_devices/sdd1"
+        # (https://labs.riseup.net/code/issues/15432)
+        self.rescan_block_device(self._get_object().props.block)
+        system_partition = self.first_partition(self.drive['udi'])
+
         # _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)