diff options
Diffstat (limited to 'pyanaconda/ui')
-rw-r--r-- | pyanaconda/ui/gui/spokes/datetime_spoke.py | 18 | ||||
-rw-r--r-- | pyanaconda/ui/gui/spokes/keyboard.py | 9 | ||||
-rw-r--r-- | pyanaconda/ui/gui/spokes/software.py | 20 | ||||
-rw-r--r-- | pyanaconda/ui/gui/spokes/source.py | 9 | ||||
-rw-r--r-- | pyanaconda/ui/gui/spokes/storage.py | 24 | ||||
-rw-r--r-- | pyanaconda/ui/gui/spokes/welcome.py | 6 | ||||
-rw-r--r-- | pyanaconda/ui/tui/spokes/storage.py | 5 |
7 files changed, 61 insertions, 30 deletions
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py index 457cac686..0a0b6868b 100644 --- a/pyanaconda/ui/gui/spokes/datetime_spoke.py +++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py @@ -366,14 +366,15 @@ class DatetimeSpoke(NormalSpoke): self._update_datetime_timer_id = None if timezone.is_valid_timezone(self.data.timezone.timezone): self._tzmap.set_timezone(self.data.timezone.timezone) - else: + elif not flags.flags.automatedInstall: log.warning("%s is not a valid timezone, falling back to default "\ "(%s)" % (self.data.timezone.timezone, DEFAULT_TZ)) self._tzmap.set_timezone(DEFAULT_TZ) self.data.timezone.timezone = DEFAULT_TZ - if not flags.can_touch_runtime_system("modify system time and date"): - self._set_date_time_setting_sensitive(False) + if self.data.timezone.timezone: + if not flags.can_touch_runtime_system("modify system time and date"): + self._set_date_time_setting_sensitive(False) self._config_dialog = NTPconfigDialog(self.data) self._config_dialog.initialize() @@ -385,9 +386,10 @@ class DatetimeSpoke(NormalSpoke): return _("%s timezone") % self.data.timezone.timezone else: return _("Invalid timezone") - - else: + elif self._tzmap.get_timezone(): return _("%s timezone") % self._tzmap.get_timezone() + else: + return _("Nothing selected") def apply(self): GLib.source_remove(self._update_datetime_timer_id) @@ -403,6 +405,7 @@ class DatetimeSpoke(NormalSpoke): new_tz = region + "/" + city self.data.timezone.timezone = new_tz + self.data.timezone.seen = True if self._ntpSwitch.get_active(): # turned ON @@ -430,7 +433,10 @@ class DatetimeSpoke(NormalSpoke): @property def completed(self): - return timezone.is_valid_timezone(self.data.timezone.timezone) + if flags.flags.automatedInstall and not self.data.timezone.seen: + return False + else: + return timezone.is_valid_timezone(self.data.timezone.timezone) @property def mandatory(self): diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py index 082702ce7..c2a9de5ff 100644 --- a/pyanaconda/ui/gui/spokes/keyboard.py +++ b/pyanaconda/ui/gui/spokes/keyboard.py @@ -269,15 +269,18 @@ class KeyboardSpoke(NormalSpoke): def apply(self): # Clear and repopulate self.data with actual values self.data.keyboard.x_layouts = list() + self.data.keyboard.seen = True + for row in self._store: self.data.keyboard.x_layouts.append(row[0]) # FIXME: Set the keyboard layout here, too. @property def completed(self): - # The keyboard spoke is always completed, as it does not require you do - # anything. There's always a default selected. - return True + if flags.flags.automatedInstall and not self.data.keyboard.seen: + return False + else: + return True @property def status(self): diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py index 3493d0c2f..cec03846a 100644 --- a/pyanaconda/ui/gui/spokes/software.py +++ b/pyanaconda/ui/gui/spokes/software.py @@ -68,10 +68,7 @@ class SoftwareSelectionSpoke(NormalSpoke): self._origAddons = [] self._origEnvironment = None - def apply(self): - # NOTE: Other apply methods work directly with the ksdata, but this - # one does not. However, selectGroup/deselectGroup modifies ksdata as - # part of its operation. So this is fine. + def _apply(self): row = self._get_selected_environment() if not row: return @@ -100,6 +97,10 @@ class SoftwareSelectionSpoke(NormalSpoke): threadMgr.add(AnacondaThread(name="AnaCheckSoftwareThread", target=self.checkSoftwareSelection)) + def apply(self): + self._apply() + self.data.packages.seen = True + def checkSoftwareSelection(self): from pyanaconda.packaging import DependencyError communication.send_message(self.__class__.__name__, @@ -123,15 +124,15 @@ class SoftwareSelectionSpoke(NormalSpoke): processingDone = not threadMgr.get("AnaCheckSoftwareThread") and \ not self._errorMsgs and self.txid_valid - if flags.automatedInstall and self.data.packages.seen: - return processingDone + if flags.automatedInstall: + return processingDone and self.data.packages.seen else: return self._get_selected_environment() is not None and processingDone @property def mandatory(self): return True - + @property def ready(self): # By default, the software selection spoke is not ready. We have to @@ -184,8 +185,7 @@ class SoftwareSelectionSpoke(NormalSpoke): # we have no way to select environments with kickstart right now # so don't try. if flags.automatedInstall and self.data.packages.seen: - # We don't want to do a full refresh, just - # join the metadata thread + # We don't want to do a full refresh, just join the metadata thread threadMgr.wait("AnaPayloadMDThread") else: if not self._first_refresh(): @@ -196,7 +196,7 @@ class SoftwareSelectionSpoke(NormalSpoke): # If packages were provided by an input kickstart file (or some other means), # we should do dependency solving here. - self.apply() + self._apply() @gtk_thread_wait def _first_refresh(self): diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 5751ca0ff..43c49282b 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -602,12 +602,15 @@ class SourceSpoke(NormalSpoke): @property def completed(self): - return not self._error and self.status and self.status != _("Nothing selected") + if flags.automatedInstall and not self.data.method.method: + return False + else: + return not self._error and self.status and self.status != _("Nothing selected") @property def mandatory(self): return True - + @property def ready(self): from pyanaconda.threads import threadMgr @@ -702,7 +705,7 @@ class SourceSpoke(NormalSpoke): if self.data.method.method == "cdrom": cdrom = self.payload.install_device chosen = True - else: + elif not flags.automatedInstall: cdrom = opticalInstallMedia(self.storage.devicetree) if cdrom: diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py index a3d31ff27..0fc064f5a 100644 --- a/pyanaconda/ui/gui/spokes/storage.py +++ b/pyanaconda/ui/gui/spokes/storage.py @@ -436,12 +436,15 @@ class StorageSpoke(NormalSpoke, StorageChecker): @property def completed(self): - return (threadMgr.get("AnaExecuteStorageThread") is None and - threadMgr.get("AnaCheckStorageThread") is None and - (self.data.ignoredisk.onlyuse != [] or - flags.automatedInstall) and - self.storage.rootDevice is not None and - not self.errors) + retval = (threadMgr.get("AnaExecuteStorageThread") is None and + threadMgr.get("AnaCheckStorageThread") is None and + self.storage.rootDevice is not None and + not self.errors) + + if flags.automatedInstall: + return retval and self.data.bootloader.seen + else: + return retval @property def ready(self): @@ -457,7 +460,12 @@ class StorageSpoke(NormalSpoke, StorageChecker): def status(self): """ A short string describing the current status of storage setup. """ msg = _("No disks selected") - if self.data.ignoredisk.onlyuse: + + if flags.automatedInstall and not self.storage.rootDevice: + return msg + elif flags.automatedInstall and not self.data.bootloader.seen: + msg = _("No bootloader configured") + elif self.data.ignoredisk.onlyuse: msg = P_(("%d disk selected"), ("%d disks selected"), len(self.data.ignoredisk.onlyuse)) % len(self.data.ignoredisk.onlyuse) @@ -643,6 +651,8 @@ class StorageSpoke(NormalSpoke, StorageChecker): self._update_summary() + self.data.bootloader.seen = True + if self.data.bootloader.location == "none": self.set_warning(_("You have chosen to skip bootloader installation. Your system may not be bootable.")) self.window.show_all() diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py index 80bf7acce..d4f8e1598 100644 --- a/pyanaconda/ui/gui/spokes/welcome.py +++ b/pyanaconda/ui/gui/spokes/welcome.py @@ -60,6 +60,12 @@ class LanguageMixIn(object): self.language.select_translation(lang) self.data.lang.lang = lang + # Skip timezone and keyboard default setting for kickstart installs. + # The user may have provided these values via kickstart and if not, we + # need to prompt for them. + if flags.flags.automatedInstall: + return + #TODO: better use GeoIP data once it is available if self.language.territory and not self.data.timezone.timezone: lang_timezone = timezone.get_preferred_timezone(self.language.territory) diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py index 80e309400..58428fcc3 100644 --- a/pyanaconda/ui/tui/spokes/storage.py +++ b/pyanaconda/ui/tui/spokes/storage.py @@ -127,7 +127,10 @@ class StorageSpoke(NormalTUISpoke): def status(self): """ A short string describing the current status of storage setup. """ msg = _("No disks selected") - if self.data.ignoredisk.onlyuse: + + if flags.automatedInstall and not self.storage.rootDevice: + return msg + elif self.data.ignoredisk.onlyuse: msg = P_(("%d disk selected"), ("%d disks selected"), len(self.data.ignoredisk.onlyuse)) % len(self.data.ignoredisk.onlyuse) |