summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2012-10-11 19:34:02 -0700
committerJesse Keating <jkeating@redhat.com>2012-10-12 12:40:33 -0700
commitbddd3a8db5470da4274a1921b7526dc21916002e (patch)
treee3b9df93c7a4db5f93a0618f86f30068ad7aa4cb
parent273df14c7221f9f1916d3e06a14cb283adf2822c (diff)
downloadanaconda-bddd3a8db5470da4274a1921b7526dc21916002e.tar.gz
anaconda-bddd3a8db5470da4274a1921b7526dc21916002e.tar.xz
anaconda-bddd3a8db5470da4274a1921b7526dc21916002e.zip
Fix graphical kickstart with %packages data
Without this change we were automatically selecting the first environment from the list, and adding it to the existing package data. This means no matter what you had in %packages you also got the GNOME environment. Obviously this is wrong, so we don't autoselect if we're doing an automated install and have package data.
-rw-r--r--pyanaconda/ui/gui/spokes/software.py54
1 files changed, 30 insertions, 24 deletions
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 080d7da36..2083b5371 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -32,6 +32,7 @@ from pyanaconda.ui.gui.utils import enlightbox, gdk_threaded
from pyanaconda.ui.gui.categories.software import SoftwareCategory
from .source import AdditionalReposDialog
+from pyanaconda.kickstart import packagesSeen
from pykickstart.parser import Group
import sys
@@ -67,15 +68,13 @@ class SoftwareSelectionSpoke(NormalSpoke):
from pyanaconda.threads import threadMgr, AnacondaThread
row = self._get_selected_environment()
- if not row:
- return
-
- self._selectFlag = False
- self.payload.data.packages.groupList = []
- self.payload.selectEnvironment(row[2])
- self.environment = row[2]
- for group in self.selectedGroups:
- self.payload.selectGroup(group)
+ if row:
+ self._selectFlag = False
+ self.payload.data.packages.groupList = []
+ self.payload.selectEnvironment(row[2])
+ self.environment = row[2]
+ for group in self.selectedGroups:
+ self.payload.selectGroup(group)
communication.send_not_ready(self.__class__.__name__)
threadMgr.add(AnacondaThread(name="AnaCheckSoftwareThread",
@@ -101,7 +100,6 @@ class SoftwareSelectionSpoke(NormalSpoke):
@property
def completed(self):
from pyanaconda.threads import threadMgr
- from pyanaconda.kickstart import packagesSeen
processingDone = not threadMgr.get("AnaCheckSoftwareThread") and \
not self._errorMsgs and \
@@ -130,7 +128,6 @@ class SoftwareSelectionSpoke(NormalSpoke):
@property
def status(self):
- from pyanaconda.kickstart import packagesSeen
from pyanaconda.threads import threadMgr
if self._errorMsgs:
@@ -169,19 +166,28 @@ class SoftwareSelectionSpoke(NormalSpoke):
communication.send_message(self.__class__.__name__, _("Downloading group metadata..."))
- with gdk_threaded():
- # Grabbing the list of groups could potentially take a long time the
- # first time (yum does a lot of magic property stuff, some of which
- # involves side effects like network access) so go ahead and grab
- # them once now.
- try:
- self.refresh()
- except MetadataError:
- communication.send_message(self.__class__.__name__,
- _("No installation source available"))
- return
-
- self.payload.release()
+ # we have no way to select environments with kickstart right now
+ # so don't try.
+ if flags.automatedInstall and packagesSeen:
+ # We don't want to do a full refresh, just
+ # join the metadata thread
+ mdGatherThread = threadMgr.get("AnaPayloadMDThread")
+ if mdGatherThread:
+ mdGatherThread.join()
+ else:
+ with gdk_threaded():
+ # Grabbing the list of groups could potentially take a long time the
+ # first time (yum does a lot of magic property stuff, some of which
+ # involves side effects like network access) so go ahead and grab
+ # them once now.
+ try:
+ self.refresh()
+ except MetadataError:
+ communication.send_message(self.__class__.__name__,
+ _("No installation source available"))
+ return
+
+ self.payload.release()
communication.send_ready(self.__class__.__name__)