[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [PATCH] ignore all missing packages
- From: David Cantrell <dcantrell redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: Re: [PATCH] ignore all missing packages
- Date: Thu, 04 Dec 2008 12:09:11 -1000
Chris Lumens wrote:
> Peter got sick of hitting "Continue" a million times to skip missing
> packages on his kickstart install. We have a %packages option to
> automatically skip them, but how about a button in the UI to do the same
> thing?
>
> - Chris
>
>
> diff --git a/kickstart.py b/kickstart.py
> index ef9488b..4d70d51 100644
> --- a/kickstart.py
> +++ b/kickstart.py
> @@ -1088,6 +1088,7 @@ def runTracebackScripts(anaconda):
>
> def selectPackages(anaconda):
> ksdata = anaconda.id.ksdata
> + ignoreAll = False
>
> # If no %packages header was seen, use the installclass's default group
> # selections. This can also be explicitly specified with %packages
> @@ -1098,7 +1099,7 @@ def selectPackages(anaconda):
>
> for pkg in ksdata.packages.packageList:
> num = anaconda.backend.selectPackage(pkg)
> - if ksdata.packages.handleMissing == KS_MISSING_IGNORE:
> + if ksdata.packages.handleMissing == KS_MISSING_IGNORE or ignoreAll:
> continue
> if num > 0:
> continue
> @@ -1110,11 +1111,12 @@ def selectPackages(anaconda):
> "abort your installation?") %(pkg,),
> type="custom",
> custom_buttons=[_("_Abort"),
> + _("_Ignore All"),
> _("_Continue")])
> if rc == 0:
> sys.exit(1)
> - else:
> - pass
> + elif rc == 1:
> + ignoreAll = True
>
> anaconda.backend.selectGroup("Core")
>
> @@ -1136,7 +1138,7 @@ def selectPackages(anaconda):
> try:
> anaconda.backend.selectGroup(grp.name, (default, optional))
> except NoSuchGroup, e:
> - if ksdata.packages.handleMissing == KS_MISSING_IGNORE:
> + if ksdata.packages.handleMissing == KS_MISSING_IGNORE or ignoreAll:
> pass
> else:
> rc = anaconda.intf.messageWindow(_("Missing Group"),
> @@ -1148,11 +1150,12 @@ def selectPackages(anaconda):
> %(grp.name,),
> type="custom",
> custom_buttons=[_("_Abort"),
> + _("_Ignore All"),
> _("_Continue")])
> if rc == 0:
> sys.exit(1)
> - else:
> - pass
> + elif rc == 1:
> + ignoreAll = True
>
> map(anaconda.backend.deselectPackage, ksdata.packages.excludedList)
>
Looks good.
--
David Cantrell <dcantrell redhat com>
Red Hat / Honolulu, HI
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]