[PATCH 1/3] Get rid of packagesSeen.

Chris Lumens clumens at redhat.com
Tue Feb 12 20:15:10 UTC 2013


pykickstart now provides this information for all commands.
---
 anaconda.spec.in                     | 2 +-
 pyanaconda/kickstart.py              | 4 ----
 pyanaconda/ui/gui/spokes/software.py | 7 +++----
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/anaconda.spec.in b/anaconda.spec.in
index 755c8a5..5bb3b74 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -23,7 +23,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %define gconfversion 2.28.1
 %define intltoolver 0.31.2-3
 %define libnlver 1.0
-%define pykickstartver 1.99.22
+%define pykickstartver 1.99.24
 %define yumver 3.4.3-32
 %define partedver 1.8.1
 %define pypartedver 2.5-2
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index c2249f6..f6bf222 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -74,8 +74,6 @@ stdoutLog = logging.getLogger("anaconda.stdout")
 from anaconda_log import logger, logLevelMap, setHandlersLevel,\
     DEFAULT_TTY_LEVEL
 
-packagesSeen = False
-
 # deviceMatches is called early, before any multipaths can possibly be coalesced
 # so it needs to know about them in some additional way: have the topology ready.
 topology = None
@@ -1484,8 +1482,6 @@ def parseKickstart(f):
         errorHandler.cb(KickstartError(), e)
         sys.exit(1)
 
-    global packagesSeen
-    packagesSeen = ksparser.getSection("%packages").timesSeen > 0
     return handler
 
 def appendPostScripts(ksdata):
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 8598303..3493d0c 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -24,7 +24,6 @@ _ = lambda x: gettext.ldgettext("anaconda", x)
 N_ = lambda x: x
 
 from pyanaconda.flags import flags
-from pyanaconda.kickstart import packagesSeen
 from pyanaconda.threads import threadMgr, AnacondaThread
 
 from pyanaconda.ui import communication
@@ -124,7 +123,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
         processingDone = not threadMgr.get("AnaCheckSoftwareThread") and \
                          not self._errorMsgs and self.txid_valid
 
-        if flags.automatedInstall and packagesSeen:
+        if flags.automatedInstall and self.data.packages.seen:
             return processingDone
         else:
             return self._get_selected_environment() is not None and processingDone
@@ -164,7 +163,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
             # Kickstart installs with %packages will have a row selected, unless
             # they did an install without a desktop environment.  This should
             # catch that one case.
-            if flags.automatedInstall and packagesSeen:
+            if flags.automatedInstall and self.data.packages.seen:
                 return _("Custom software selected")
 
             return _("Nothing selected")
@@ -184,7 +183,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
 
         # we have no way to select environments with kickstart right now
         # so don't try.
-        if flags.automatedInstall and packagesSeen:
+        if flags.automatedInstall and self.data.packages.seen:
             # We don't want to do a full refresh, just
             # join the metadata thread
             threadMgr.wait("AnaPayloadMDThread")
-- 
1.7.11.2



More information about the anaconda-patches mailing list