[PATCH 2/2] Handle human readable environment names from kickstart (#1234890)
Martin Kolman
mkolman at redhat.com
Tue Jun 30 10:36:00 UTC 2015
On Mon, 2015-06-29 at 13:40 +0200, Vratislav Podzimek wrote:
> On Fri, 2015-06-26 at 15:31 +0200, Martin Kolman wrote:
> > Correctly support human readable & localized human readable
> > environment specifications from kickstart, not just the
> > "machine readable" environment id.
> >
> > Also keep the specification in its original format as long as it is
> > valid, so that the input and output kickstarts have the same
> > environment specifications.
> >
> > Related: rhbz#1234890
> > Signed-off-by: Martin Kolman <mkolman at redhat.com>
> > ---
> > pyanaconda/packaging/yumpayload.py | 14 ++++++++++++
> > pyanaconda/ui/gui/spokes/software.py | 43
> > +++++++++++++++++++++++++++---------
> > 2 files changed, 47 insertions(+), 10 deletions(-)
> >
> > diff --git a/pyanaconda/packaging/yumpayload.py
> > b/pyanaconda/packaging/yumpayload.py
> > index ee9a059..11e4f3b 100644
> > --- a/pyanaconda/packaging/yumpayload.py
> > +++ b/pyanaconda/packaging/yumpayload.py
> > @@ -1006,6 +1006,20 @@ reposdir=%s
> >
> > return (environment.ui_name,
> > environment.ui_description)
> >
> > + def environmentId(self, environmentid):
> I think 'environment' would be a better name for the argument as this
> looks confusing otherwise.
OK, fixing locally. :)
>
> > + """ Return environment id for the environment specified by
> > id or name."""
> > + groups = self._yumGroups
> > + if not groups:
> > + return environmentid
> > +
> > + with _yum_lock:
> > + if not groups.has_environment(environmentid):
> > + raise NoSuchGroup(environmentid)
> > +
> > + environment = groups.return_environment(environmentid)
> > +
> > + return environment.environmentid
> > +
> > def selectEnvironment(self, environmentid):
> > groups = self._yumGroups
> > if not groups:
>
>
More information about the anaconda-patches
mailing list