summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2017-09-20 15:40:54 +0200
committeranonym <anonym@riseup.net>2017-09-20 18:12:02 +0200
commitf7c6df3d6e0d9def91cca89f7e43f70f92dfb706 (patch)
tree908f9f6edff8e5f0dd93e2dda93b5f5cf21166ee
parentf7138142481d10dcded532f843713d9d14c0bf49 (diff)
Properly identify too small devices.
I cannot pretend to understand why the previous condition was supposed to work. Any way, it didn't work for isohybrid's, but this new condition does, while being more self-explaining.
-rwxr-xr-xtails_installer/creator.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tails_installer/creator.py b/tails_installer/creator.py
index 8b7c68e..6b23249 100755
--- a/tails_installer/creator.py
+++ b/tails_installer/creator.py
@@ -663,9 +663,11 @@ class LinuxTailsInstallerCreator(TailsInstallerCreator):
else:
parent_block = None
- # Check for devices that are too small
- if parent_block is None \
- and not self.is_device_big_enough_for_installation(data['size']):
+ # Check for devices that are too small. Note that we still
+ # allow devices that can be upgraded for supporting legacy
+ # installations.
+ if not self.is_device_big_enough_for_installation(data['size']) and \
+ not self.device_can_be_upgraded(data):
self.log.warning('Skipping too small device: %s' % data['device'])
data['is_device_big_enough_for_installation'] = False