Re: [PATCH] ignore all missing packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

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

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux