summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-01-20 21:42:43 +0000
committerChris Lumens <clumens@redhat.com>2006-01-20 21:42:43 +0000
commita50a83c8e9a271eccddebae22c1431bf041fabe2 (patch)
tree4905504eb555c6626e68e2df39ffc55173bd363f
parent4d093939e33457bc9a9883c3db9cc4cfe8c155e9 (diff)
downloadanaconda-a50a83c8e9a271eccddebae22c1431bf041fabe2.tar.gz
anaconda-a50a83c8e9a271eccddebae22c1431bf041fabe2.tar.xz
anaconda-a50a83c8e9a271eccddebae22c1431bf041fabe2.zip
Write out %packages section in the template kickstart file.
-rw-r--r--ChangeLog9
-rwxr-xr-xanaconda2
-rw-r--r--backend.py4
-rw-r--r--instdata.py5
-rw-r--r--yuminstall.py16
5 files changed, 33 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4aa7374c5..c51d1ad37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-01-20 Chris Lumens <clumens@redhat.com>
+
+ * anaconda: Pass backend to instdata.
+ * backend.py (AnacondaBackend.writePackagesKS): Add default method.
+ * instdata.py (InstallData): Add backend to instdata. Call
+ writePackagesKS.
+ * yuminstall.py (YumBackend.writePackagesKS): Write %packages section
+ in template kickstart file.
+
2006-01-20 Peter Jones <pjones@redhat.com>
* loader2/loader.c (spawnShell): set PYTHONSTARTUP before spawning bash
diff --git a/anaconda b/anaconda
index b8b634171..ea8e2d283 100755
--- a/anaconda
+++ b/anaconda
@@ -1103,7 +1103,7 @@ floppyDevice = floppy.probeFloppyDevice()
if not flags.test and flags.setupFilesystems:
iutil.makeDriveDeviceNodes()
-id = instClass.installDataClass(extraModules, floppyDevice, method)
+id = instClass.installDataClass(extraModules, floppyDevice, method, backend)
id.x_already_set = x_already_set
diff --git a/backend.py b/backend.py
index 0cd4b7064..738b790f3 100644
--- a/backend.py
+++ b/backend.py
@@ -135,6 +135,10 @@ class AnacondaBackend:
log.warning("getDefaultGroups not implemented for backend!")
pass
+ def writePackagesKS(self, f):
+ log.warning("writePackagesKS not implemented for backend!")
+ pass
+
def doRepoSetup(backend, intf, id, instPath):
backend.doInitialSetup(id, instPath)
backend.doRepoSetup(intf, instPath)
diff --git a/instdata.py b/instdata.py
index 64ea965e8..d1c2b989b 100644
--- a/instdata.py
+++ b/instdata.py
@@ -207,7 +207,7 @@ class InstallData:
self.timezone.writeKS(f)
self.bootloader.writeKS(f)
self.partitions.writeKS(f)
-# backend.writePackagesKS(f)
+ self.backend.writePackagesKS(f)
f.write("\n%post\n")
self.accounts.writeKScommands(f, useMD5)
@@ -215,9 +215,10 @@ class InstallData:
os.chmod(filename, 0600)
- def __init__(self, extraModules, floppyDevice, methodstr):
+ def __init__(self, extraModules, floppyDevice, methodstr, backend):
self.instLanguage = language.Language()
self.keyboard = keyboard.Keyboard()
+ self.backend = backend
self.mouse = None
self.monitor = None
diff --git a/yuminstall.py b/yuminstall.py
index 25658f941..a21080fe1 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -999,6 +999,22 @@ class YumBackend(AnacondaBackend):
else:
log.debug("no such package %s" %(pkg,))
+ def writePackagesKS(self, f):
+ groups = []
+ packages = []
+
+ for txmbr in self.ayum.tsInfo.getMembers():
+ if txmbr.groups:
+ for g in txmbr.groups:
+ if g not in groups:
+ groups.append(g)
+ else:
+ packages.append(txmbr.name)
+
+ f.write("\n%packages\n")
+ map(lambda grp: f.write("@%s\n" % grp), groups)
+ map(lambda pkg: f.write("%s\n" % pkg), packages)
+
class YumProgress:
def __init__(self, intf, text, total):
window = intf.progressWindow(_("Installation Progress"), text,