summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2008-09-11 15:32:28 -0400
committerJeremy Katz <katzj@redhat.com>2008-09-29 10:14:35 -0400
commitbdd1c56bbcaf250ab6c8f8508b2cc16898601ae0 (patch)
tree1c277d6c0b3ba7de70db263ca865dd789fac9e89
parent84e218b892fdc4fd92ec3b57348fa729de4ebd95 (diff)
downloadanaconda-bdd1c56bbcaf250ab6c8f8508b2cc16898601ae0.tar.gz
anaconda-bdd1c56bbcaf250ab6c8f8508b2cc16898601ae0.tar.xz
anaconda-bdd1c56bbcaf250ab6c8f8508b2cc16898601ae0.zip
Select packages after repos are set up (#457583)
Set up which packages are actually selected after you've done your repo configuration so that we don't have packages set to be installed from repos which no longer exist. To do this, we switch to using whether or not the group is default rather than selecting/deselecting groups in task selection. Then, move the base package selecting to be later
-rw-r--r--dispatch.py2
-rw-r--r--iw/task_gui.py12
-rw-r--r--textw/task_text.py8
3 files changed, 14 insertions, 8 deletions
diff --git a/dispatch.py b/dispatch.py
index 77eb90ada..3a7dc1af4 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -94,8 +94,8 @@ installSteps = [
("bootloadersetup", bootloaderSetupChoices, ),
("bootloader", ),
("reposetup", doBackendSetup, ),
- ("basepkgsel", doBasePackageSelect, ),
("tasksel", ),
+ ("basepkgsel", doBasePackageSelect, ),
("group-selection", ),
("postselection", doPostSelection, ),
("install", ),
diff --git a/iw/task_gui.py b/iw/task_gui.py
index 6d91f3d62..e37849ea4 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -442,17 +442,21 @@ class TaskWindow(InstallWindow):
tasks = self.xml.get_widget("taskList").get_model()
for (cb, task, grps) in tasks:
+ # we just set things as default or not; group selection
+ # happens after this screen.
if cb:
- map(self.backend.selectGroup, grps)
+ map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
+ "default", True), grps)
else:
- map(self.backend.deselectGroup, grps)
+ map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
+ "default", False), grps)
def groupsInstalled(self, lst):
- # FIXME: yum specific
+ # FIXME: yum specific.
rc = False
for gid in lst:
g = self.backend.ayum.comps.return_group(gid)
- if g and not g.selected:
+ if g and not g.default:
return False
elif g:
rc = True
diff --git a/textw/task_text.py b/textw/task_text.py
index 470053df6..9a2c34f53 100644
--- a/textw/task_text.py
+++ b/textw/task_text.py
@@ -30,7 +30,7 @@ class TaskWindow:
rc = False
for gid in lst:
g = self.backend.ayum.comps.return_group(gid)
- if g and not g.selected:
+ if g and not g.default:
return False
elif g:
rc = True
@@ -89,9 +89,11 @@ class TaskWindow:
sel = ct.getSelection()
for (txt, grps) in tasks:
if txt in sel:
- map(self.backend.selectGroup, grps)
+ map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
+ "default", True), grps)
else:
- map(self.backend.deselectGroup, grps)
+ map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
+ "default", False), grps)
screen.popWindow()
return INSTALL_OK