[Pkg-privacy-commits] [tails-installer] 25/70: Feature 9005:
Ulrike Uhlig
ulrike at moszumanska.debian.org
Mon Nov 20 14:54:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
ulrike pushed a commit to annotated tag tails-installer_4.20
in repository tails-installer.
commit 0948ff768f783e9c214641c6d7009fb9e6ecebe4
Author: Tails developers <amnesia at boum.org>
Date: Mon May 9 17:13:45 2016 +0200
Feature 9005:
Add a variable to verify if we should reinstall a Tails device.
---
tails_installer/gui.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tails_installer/gui.py b/tails_installer/gui.py
index 28a9226..efd4ce0 100755
--- a/tails_installer/gui.py
+++ b/tails_installer/gui.py
@@ -193,6 +193,11 @@ class TailsInstallerThread(threading.Thread):
if not self.live.can_read_partition_table():
self.live.log.info('Clearing unreadable partition table.')
self.live.clear_all_partition_tables()
+ if self.parent.reinstall_device:
+ parent = _to_unicode(self.live.drive['parent'])
+ self.rescan_devices(force_partitions=False)
+ self.live.drive = self.live.drives[parent]['device']
+ self.live.save_full_drive()
self.live.partition_device()
self.rescan_devices(force_partitions=True)
self.live.switch_drive_to_system_partition()
@@ -297,6 +302,7 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
self.target_available = False
self.target_selected = False
self.device_with_persistence = []
+ self.reinstall_device = False
if self.opts.unprivileged == None:
self.opts.unprivileged = True
@@ -435,9 +441,11 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
# If there is persistence upgrade without deleting it
if device['parent'] in self.device_with_persistence:
self.opts.partition = False
+ self.reinstall_device = False
self.__button_start.set_label('Upgrade Tails device: keep data')
else:
self.opts.partition = True
+ self.reinstall_device = True
self.__button_start.set_label('Upgrade Tails device: not keep data')
def get_device_pretty_name(self, device):
@@ -520,7 +528,6 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
# Skip LUKS-encrypted partitions
if info['fstype'] and info['fstype'] == 'crypto_LUKS':
self.live.log.debug('Skipping LUKS-encrypted partition: %s' % info['device'])
- print info['parent']
self.device_with_persistence.append(info['parent'])
continue
pretty_name = self.get_device_pretty_name(info)
--
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