diff options
author | Chris Lumens <clumens@redhat.com> | 2006-01-20 21:42:43 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2006-01-20 21:42:43 +0000 |
commit | a50a83c8e9a271eccddebae22c1431bf041fabe2 (patch) | |
tree | 4905504eb555c6626e68e2df39ffc55173bd363f | |
parent | 4d093939e33457bc9a9883c3db9cc4cfe8c155e9 (diff) | |
download | anaconda-a50a83c8e9a271eccddebae22c1431bf041fabe2.tar.gz anaconda-a50a83c8e9a271eccddebae22c1431bf041fabe2.tar.xz anaconda-a50a83c8e9a271eccddebae22c1431bf041fabe2.zip |
Write out %packages section in the template kickstart file.
-rw-r--r-- | ChangeLog | 9 | ||||
-rwxr-xr-x | anaconda | 2 | ||||
-rw-r--r-- | backend.py | 4 | ||||
-rw-r--r-- | instdata.py | 5 | ||||
-rw-r--r-- | yuminstall.py | 16 |
5 files changed, 33 insertions, 3 deletions
@@ -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 @@ -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, |