-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

Ticket: https://labs.riseup.net/code/issues/6538

I am sending a patch again, since I could not access the repo (It does
not recognize my public key, maybe its my fault :/). Besides, I am not
sure about the smallest required size for the USB stick, I wrote a
kind of arbitrary size:

+    'min_device_size': 2.8,

based on the ticket and this document:
https://tails.boum.org/contribute/design/installation/
Any feedback is very welcome.

Cheers,

kurono
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlSHVq0ACgkQ94rPTJlzoM4uJgEAhQBV8OIXo5QcTnuwjVUWFjmR
KKiGsRuetFBkoXIwqzoA/3EDjSQFy1w3Z2VNxm9oTbWIIQBPJmu02oTHnn6wUFBz
=BdSh
-----END PGP SIGNATURE-----
>From c9bc0857003e997a1cc31bb3753e3908d880f77d Mon Sep 17 00:00:00 2001
From: Tails developers <ta...@boum.org>
Date: Tue, 9 Dec 2014 20:44:48 +0100
Subject: [PATCH] 
 bugfix/6538-Tails-Installer-tries-to-install-to-too-small-devices

---
 liveusb/config.py  | 1 +
 liveusb/creator.py | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/liveusb/config.py b/liveusb/config.py
index e3e1b40..cd60f20 100644
--- a/liveusb/config.py
+++ b/liveusb/config.py
@@ -9,6 +9,7 @@ config_files = [ os.path.join('/', 'etc', 'liveusb-creator', f )
 
 # XXX: move defaults to a proper defaults.ini file?
 default_config = {
+    'min_device_size': 2.8,
     'main_liveos_dir': 'live',
     'running_liveos_mountpoint': '/lib/live/mount/medium',
     'liveos_toplevel_files': [ 'autorun.bat', 'autorun.inf', 'boot', '.disk',
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 20981d6..c9c0c34 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -674,6 +674,11 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
                     self.log.debug('Skipping device without size: %s' % device)
                     continue
 
+                # Skip devices that are too small
+                if (data['size']/10.0**9) < config['min_device_size']:
+                    self.log.warning('Skipping too small device: %s' % device)
+                    continue
+
                 parent = dev.Get(device, 'PartitionSlave')
                 if parent and parent != '/':
                     data['parent'] = str(dbus.Interface(self._get_device(parent),
-- 
1.8.3.2

Attachment: 6538-install-to-too-small-devices.patch.sig
Description: PGP signature

_______________________________________________
Tails-dev mailing list
Tails-dev@boum.org
https://mailman.boum.org/listinfo/tails-dev
To unsubscribe from this list, send an empty email to 
tails-dev-unsubscr...@boum.org.

Reply via email to