[PATCH 2/3] Restore support for partial kickstart files (#887254).

Vratislav Podzimek vpodzime at redhat.com
Wed Feb 13 10:36:33 UTC 2013


On Tue, 2013-02-12 at 15:15 -0500, Chris Lumens wrote:
> ---
>  pyanaconda/kickstart.py                    |  4 ++--
>  pyanaconda/packaging/yumpayload.py         |  6 ++++--
>  pyanaconda/ui/gui/spokes/datetime_spoke.py | 22 ++++++++++++++--------
>  pyanaconda/ui/gui/spokes/keyboard.py       |  9 ++++++---
>  pyanaconda/ui/gui/spokes/software.py       | 20 ++++++++++----------
>  pyanaconda/ui/gui/spokes/source.py         |  9 ++++++---
>  pyanaconda/ui/gui/spokes/storage.py        | 24 +++++++++++++++++-------
>  pyanaconda/ui/gui/spokes/welcome.py        |  6 ++++++
>  pyanaconda/ui/tui/spokes/storage.py        |  5 ++++-
>  9 files changed, 69 insertions(+), 36 deletions(-)
> 
> diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
> index f6bf222..2386944 100644
> --- a/pyanaconda/kickstart.py
> +++ b/pyanaconda/kickstart.py
> @@ -577,9 +577,9 @@ class IscsiName(commands.iscsiname.FC6_IscsiName):
>  class Lang(commands.lang.FC3_Lang):
>      def __init__(self, *args, **kwargs):
>          commands.lang.FC3_Lang.__init__(self, *args, **kwargs)
> -        if not self.lang:
> +        if not self.lang and not flags.automatedInstall:
>              self.lang = DEFAULT_LANG
> -    
> +
>      def execute(self, *args, **kwargs):
>          localization.write_language_configuration(self, ROOT_PATH)
>  
> diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
> index 6ca2f3b..1f10176 100644
> --- a/pyanaconda/packaging/yumpayload.py
> +++ b/pyanaconda/packaging/yumpayload.py
> @@ -415,10 +415,12 @@ reposdir=%s
>          # start with a fresh YumBase instance
>          self.reset(root=root)
>  
> -        # If askmethod was given on the command line, we don't want to do
> +        # If this is a kickstart install and no method has been set up, or
> +        # askmethod was given on the command line, we don't want to do
>          # anything.  Just disable all repos and return.  This should avoid
>          # metadata fetching.
> -        if flags.askmethod:
> +        if (not self.data.method.method and flags.automatedInstall) or \
> +           flags.askmethod:
>              with _yum_lock:
>                  for repo in self._yum.repos.repos.values():
>                      self.disableRepo(repo.id)
> diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
> index 6e5207f..fa913f9 100644
> --- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
> +++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
> @@ -366,17 +366,18 @@ 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()
> +            self._config_dialog = NTPconfigDialog(self.data)
> +            self._config_dialog.initialize()
I don't understand why the last two lines were moved under the
condition. I believe that dialog should be created and initialized no
matter if the timezone is set in self.data or not.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list