Commit 0cbb2c50 authored by intrigeri's avatar intrigeri

tails-installer (5.0.9+dfsg-0tails1)

Git-Dch: Ignore
parent c7acab81
tails-installer (5.0.8+dfsg-0tails1+bugfix.15590.14849.14720.14810.7904~2.gbp56233b) bugfix-7904-15590-14849-14720-14810-installer-fixes-for-3.9; urgency=medium
** SNAPSHOT build @56233b716d590e691f8960c473798e516161c007 **
tails-installer (5.0.9+dfsg-0tails1) devel; urgency=medium
* Link to upgrade documentation when upgrading (Closes: Tails#7904).
-- intrigeri <intrigeri@debian.org> Sat, 28 Jul 2018 04:04:34 +0000
tails-installer (5.0.8+dfsg-0tails1+bugfix.15590.14849.14720.14810~1.gbpeb62ed) bugfix-15590-14849-14720-14810-installer-fixes-for-3.9; urgency=medium
** SNAPSHOT build @eb62ed4189c81d6f31bb5a6ff4e74346bdf031d3 **
* Import bugfix/15590-14849-14720-14810-installer-fixes-for-3.9
(at commit d9b8247) as a quilt patch
(Closes: Tails#15590, Tails#14849, Tails#14720, Tails#14810)
-- intrigeri <intrigeri@debian.org> Tue, 10 Jul 2018 12:38:24 +0000
* Show the reinstall option only when the device is big enough to make
a full reinstallation (Closes: Tails#14810).
* Make the main window fit in a 600px-high screen (Closes: Tails#14849).
* Show the correct device size in the reinstall confirmation dialog
(Closes: Tails#15590).
* Fix self.opts.partition vs. self.force_reinstall semantics
(Closes: Tails#14720).
-- Tails developers <tails@boum.org> Thu, 16 Aug 2018 09:43:25 +0000
tails-installer (5.0.8+dfsg-1) unstable; urgency=medium
......
From: kurono <andres.gomez@cern.ch>
Date: Wed, 20 Jun 2018 18:51:47 +0200
Subject: bugfix/15590-14849-14720-14810-installer-fixes-for-3.9
---
data/tails-installer.ui | 2 +-
tails_installer/creator.py | 33 +++++++++++++++++++++------------
tails_installer/gui.py | 31 ++++++++++++++++---------------
4 files changed, 38 insertions(+), 28 deletions(-)
diff --git a/data/tails-installer.ui b/data/tails-installer.ui
index e4c5468..62900da 100644
--- a/data/tails-installer.ui
+++ b/data/tails-installer.ui
@@ -346,7 +346,7 @@
<property name="margin_right">18</property>
<property name="margin_bottom">6</property>
<property name="shadow_type">in</property>
- <property name="min_content_height">200</property>
+ <property name="min_content_height">130</property>
<child>
<object class="GtkTextView" id="textview_log">
<property name="visible">True</property>
diff --git a/tails_installer/creator.py b/tails_installer/creator.py
index 2a949ae..3cf054f 100755
--- a/tails_installer/creator.py
+++ b/tails_installer/creator.py
@@ -88,7 +88,6 @@ class TailsInstallerCreator(object):
log = None
ext_fstypes = set(['ext2', 'ext3', 'ext4'])
valid_fstypes = set(['vfat', 'msdos']) | ext_fstypes
- force_reinstall = False
drive = property(fget=lambda self: self.drives[self._drive],
fset=lambda self, d: self._set_drive(d))
@@ -605,10 +604,12 @@ class LinuxTailsInstallerCreator(TailsInstallerCreator):
'parent': None,
'parent_udi': None,
'parent_size': None,
+ 'parent_data': None,
'size': block.props.size,
'mounted_partitions': set(),
'is_device_big_enough_for_installation': True,
'is_device_big_enough_for_upgrade': True,
+ 'is_device_big_enough_for_reinstall': True,
'removable': drive.props.removable,
}
@@ -655,12 +656,16 @@ class LinuxTailsInstallerCreator(TailsInstallerCreator):
if not self.is_device_big_enough_for_installation(
data['parent_size']
if data['parent_size']
- else data['size']) \
- and not self.device_can_be_upgraded(data):
- self.log.warning(
- 'Device is too small for installation: %s'
- % data['device'])
- data['is_device_big_enough_for_installation'] = False
+ else data['size']):
+ if not self.device_can_be_upgraded(data):
+ self.log.warning(
+ 'Device is too small for installation: %s'
+ % data['device'])
+ data['is_device_big_enough_for_installation'] = False
+ # Since reinstalling is a special case where full overitting
+ # is done, the size of the device has to be bigger than
+ # min_installation_device_size in all cases.
+ data['is_device_big_enough_for_reinstall'] = False
# To be more accurate we would need to either mount the candidate
# device (which causes UX problems down the road) or to recursively
@@ -714,11 +719,15 @@ class LinuxTailsInstallerCreator(TailsInstallerCreator):
continue
self.drives[data['device']] = data
- # Remove parent drives if a valid partition exists
- if not self.force_reinstall:
- for parent in [d['parent'] for d in self.drives.values()]:
- if parent in self.drives:
- del(self.drives[parent])
+ # Remove parent drives if a valid partition exists.
+ # This is always made to avoid listing both the devices
+ # and their parents in the gui dropdown list.
+ # But we keep the parent data in case of a reinstallation.
+ for d in self.drives.values():
+ if d['parent'] is not None and d['parent'] in self.drives:
+ self.drives[d['device']]['parent_data']\
+ = self.drives[d['parent']].copy()
+ del(self.drives[d['parent']])
self.log.debug(pformat(mounted_parts))
diff --git a/tails_installer/gui.py b/tails_installer/gui.py
index 7fb6a10..7cec7dc 100755
--- a/tails_installer/gui.py
+++ b/tails_installer/gui.py
@@ -193,13 +193,15 @@ 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.force_reinstall:
- parent = _to_unicode(self.live.drive['parent'])
- self.rescan_devices(force_partitions=False)
- if parent in self.live.drives and \
- 'device' in self.live.drives[parent]:
- self.live.drive = self.live.drives[parent]['device']
- self.live.save_full_drive()
+ # If there is a partition already in place and we need
+ # to reinstall, then we need to change the selected
+ # device for its saved parent, if it exists
+ if self.parent.force_reinstall and \
+ self.live.drive['parent_data'] is not None:
+ parent_data = self.live.drive['parent_data']
+ self.live.drives[parent_data['device']] = parent_data
+ self.live.drive = parent_data['device']
+ self.live.save_full_drive()
self.live.partition_device()
self.rescan_devices(force_partitions=True)
self.live.switch_drive_to_system_partition()
@@ -445,7 +447,6 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
return
self.force_reinstall = True
self.opts.partition = True
- self.live.force_reinstall = True
self.__button_force_reinstall.set_visible(False)
self.on_start_clicked(button)
@@ -454,7 +455,6 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
def on_target_changed(self, combobox_target):
# get selected device
- self.__button_force_reinstall.set_visible(False)
drive = self.get_selected_drive()
if drive == None:
return
@@ -463,13 +463,14 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
if self.live.device_can_be_upgraded(device):
self.opts.partition = False
self.force_reinstall = False
- self.live.force_reinstall = False
self.__button_start.set_label(_('Upgrade'))
- self.__button_force_reinstall.set_visible(True)
+ if device['is_device_big_enough_for_reinstall']:
+ self.__button_force_reinstall.set_visible(True)
+ else:
+ self.__button_force_reinstall.set_visible(False)
else:
self.opts.partition = True
self.force_reinstall = True
- self.live.force_reinstall = False
self.__button_start.set_label(_('Install'))
self.__button_force_reinstall.set_visible(False)
@@ -520,8 +521,6 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
def update_start_button(self):
if self.source_available and self.target_available:
self.__button_start.set_sensitive(True)
- if not self.opts.partition:
- self.__button_force_reinstall.set_visible(True)
else:
self.__button_start.set_sensitive(False)
@@ -746,7 +745,9 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
{'vendor': self.live.drive['vendor'],
'model': self.live.drive['model'],
'device': self.live.drive['device'],
- 'size': _format_bytes_in_gb(self.live.drive['size'])
+ 'size': _format_bytes_in_gb(self.live.drive['parent_size']
+ if self.live.drive['parent_size']
+ else self.live.drive['size'])
},
False):
self.confirmed = True
From: kurono <andres.gomez@cern.ch>
Date: Wed, 20 Jun 2018 19:37:31 +0200
Subject: Link to upgrade doc when upgrading (Closes: Tails#7904)
---
data/tails-installer.ui | 4 ++--
tails_installer/gui.py | 9 +++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/data/tails-installer.ui b/data/tails-installer.ui
index 62900da..b4b6d33 100644
--- a/data/tails-installer.ui
+++ b/data/tails-installer.ui
@@ -135,7 +135,7 @@
</packing>
</child>
<child>
- <object class="GtkLinkButton" id="help_install_link">
+ <object class="GtkLinkButton" id="help_link">
<property name="label" translatable="yes">Installation Instructions</property>
<property name="visible">True</property>
<property name="margin_right">18</property>
@@ -201,7 +201,7 @@
</packing>
</child>
<child>
- <object class="GtkLinkButton" id="help_install_link_question">
+ <object class="GtkLinkButton" id="help_link_question">
<property name="label"></property>
<property name="always_show_image">True</property>
<property name="visible">True</property>
diff --git a/tails_installer/gui.py b/tails_installer/gui.py
index 7cec7dc..a7b5a6b 100755
--- a/tails_installer/gui.py
+++ b/tails_installer/gui.py
@@ -396,6 +396,7 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
self.__radio_button_source_iso = builder.get_object('radio_button_source_iso')
self.__radio_button_source_device = builder.get_object('radio_button_source_device')
self.__button_force_reinstall = builder.get_object('check_force_reinstall')
+ self.__help_link = builder.get_object('help_link')
self.add(self.__box_installer)
builder.connect_signals(self)
@@ -464,6 +465,10 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
self.opts.partition = False
self.force_reinstall = False
self.__button_start.set_label(_('Upgrade'))
+ self.__help_link.set_label(
+ _('Manual Upgrade Instructions'))
+ self.__help_link.set_uri(
+ _('https://tails.boum.org/upgrade/'))
if device['is_device_big_enough_for_reinstall']:
self.__button_force_reinstall.set_visible(True)
else:
@@ -473,6 +478,10 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
self.force_reinstall = True
self.__button_start.set_label(_('Install'))
self.__button_force_reinstall.set_visible(False)
+ self.__help_link.set_label(
+ _('Installation Instructions'))
+ self.__help_link.set_uri(
+ _('https://tails.boum.org/install/'))
def get_device_pretty_name(self, device):
size = _format_bytes_in_gb(device['parent_size']
0001-bugfix-15590-14849-14720-14810-installer-fixes-for-3.patch
0002-bug-7904-link-to-upgrade-doc-when-upgrading.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment