Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Development (http://www.linux-archive.org/ubuntu-development/)
-   -   ignore all missing packages (http://www.linux-archive.org/ubuntu-development/205809-ignore-all-missing-packages.html)

Chris Lumens 12-04-2008 07:56 PM

ignore all missing packages
 
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)


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

David Cantrell 12-04-2008 09:09 PM

ignore all missing packages
 
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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

Hans de Goede 12-05-2008 12:37 PM

ignore all missing packages
 
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



Looks good,

Hans




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)



_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 10:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.