[Pkg-privacy-commits] [tails-installer] 22/70: Feature 9005:

Ulrike Uhlig ulrike at moszumanska.debian.org
Mon Nov 20 14:54:53 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 92e3c63245e6de4449cd210969d14dc5df79ccb9
Author: Tails developers <amnesia at boum.org>
Date:   Mon Apr 11 16:28:38 2016 +0200

    Feature 9005:
    
    Fix the way Tails Installer starts without the splahs screen.
---
 tails-installer        |  6 +++---
 tails_installer/gui.py | 53 ++++++++++++++++++++++++++++----------------------
 2 files changed, 33 insertions(+), 26 deletions(-)

diff --git a/tails-installer b/tails-installer
index 7fdd9a5..acf20cd 100755
--- a/tails-installer
+++ b/tails-installer
@@ -2,7 +2,7 @@
 # coding: utf-8
 #
 # Copyright © 2008-2013  Red Hat, Inc. All rights reserved.
-# Copyright © 2012-2015  Tails Developers <tails at boum.org>
+# Copyright © 2012-2016  Tails Developers <tails at boum.org>
 #
 # This copyrighted material is made available to anyone wishing to use, modify,
 # copy, or redistribute it subject to the terms and conditions of the GNU
@@ -38,11 +38,11 @@ def parse_args():
     parser.add_option('-s', '--safe', dest='safe', action='store_true',
                       help='Use the "safe, slow and stupid" bootloader')
     parser.add_option('-n', '--noverify', dest='noverify', action='store_true',
-                      default=True, help='Skip checksum verification')
+                      help='Skip checksum verification')
     parser.add_option('-v', '--verbose', dest='verbose', action='store_true',
                       help='Output extra debugging messages')
     parser.add_option('-u', '--unprivileged', dest='unprivileged',
-                      action='store_true', default=True, help='Allow not being root')
+                      action='store_true', help='Allow not being root')
     parser.add_option('-k', '--extra-kernel-args', dest='kernel_args',
                       action='store', metavar='ARGS',
                       help='Supply extra kernel arguments'
diff --git a/tails_installer/gui.py b/tails_installer/gui.py
index fca229b..3362124 100755
--- a/tails_installer/gui.py
+++ b/tails_installer/gui.py
@@ -3,7 +3,7 @@
 # Copyright © 2008-2013  Red Hat, Inc. All rights reserved.
 # Copyright © 2008-2013  Luke Macken <lmacken at redhat.com>
 # Copyright © 2008  Kushal Das <kushal at fedoraproject.org>
-# Copyright © 2012-2015  Tails Developers <tails at boum.org>
+# Copyright © 2012-2016  Tails Developers <tails at boum.org>
 #
 # This copyrighted material is made available to anyone wishing to use, modify,
 # copy, or redistribute it subject to the terms and conditions of the GNU
@@ -298,13 +298,37 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
         self.target_selected  = False
         self.persistence = False
 
+        if self.opts.unprivileged == None:
+            self.opts.unprivileged = True
+        if self.opts.noverify == None:
+            self.opts.noverify = True
+        if self.opts.xo == None:
+            self.opts.xo = True
+
         self._build_ui()
 
-        self.update_start_button()
+        # Inside tails
+        if is_running_from_tails():
+            self.opts.clone = True
+        else:
+            self.opts.clone = False
+            # FIXME: better put those in box
+            self.__radio_button_source_iso.set_visible(False)
+            self.__radio_button_source_device.set_visible(False)
+
+        if self.opts.clone or config['download']['enabled']:
+            self.source_available = True
+        if self.opts.clone:
+            self.__box_source.set_visible(False)
         if not config['download']['enabled']:
             self.__box_source_dl.set_visible(False)
         self.update_start_button()
         self.live = TailsInstallerCreator(opts=opts)
+        if self.opts.clone:
+            self.live.source = RunningLiveSystemSource(
+                path=config['running_liveos_mountpoint'])
+        if not self.opts.clone:
+            self.populate_releases()
         self.populate_devices()
         self.downloader = None
         self.progress_thread = ProgressThread(parent=self)
@@ -364,6 +388,8 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
         self.__textview_log = builder.get_object('textview_log')
         self.__progressbar = builder.get_object('progressbar_progress')
         self.__button_start = builder.get_object('button_start')
+        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.add(self.__box_installer)
         builder.connect_signals(self)
@@ -402,21 +428,15 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
         drive = self.get_selected_drive()
         device = self.live.drives[drive]
 
-        # Inside tails
-        if not is_running_from_tails():
-            self.opts.clone = False
-
-        # If device has not a valid recognized Tails partition
+        # If device has any valid recognized Tails partition
         if not self.live.device_can_be_upgraded(device):
            self.opts.partition = True
         else:
-            # If persistence
+            # If there is persistence upgrade without deleting it
             if self.persistence:
-                # Upgrade without deleting it
                 self.opts.partition = False
             else:
                 self.opts.partition = True
-        self.update_gui_components()
 
     def get_device_pretty_name(self, device):
         size = _format_bytes_in_gb(device['parent_size']
@@ -436,19 +456,6 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
         }
         return pretty_name
 
-    def update_gui_components(self):
-        if self.opts.clone or config['download']['enabled']:
-            self.source_available = True
-        if self.opts.clone:
-            self.__box_source.set_visible(False)
-        if not config['download']['enabled']:
-            self.__box_source_dl.set_visible(False)
-        if self.opts.clone:
-            self.live.source = RunningLiveSystemSource(
-                path=config['running_liveos_mountpoint'])
-        if not self.opts.clone:
-            self.populate_releases()
-
     def on_start_clicked(self, button):
         self.begin()
 

-- 
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