[Fedora-livecd-list] 2 commits - imgcreate/creator.py imgcreate/kickstart.py
Jeremy Katz
katzj at fedoraproject.org
Fri Sep 5 14:54:42 UTC 2008
imgcreate/creator.py | 3 +++
imgcreate/kickstart.py | 19 +++++++++++++++++++
2 files changed, 22 insertions(+)
New commits:
commit 9d05379c53f718699080bdce60a4457b13dd5870
Author: Bryan Kearney <bkearney at redhat.com>
Date: Thu Sep 4 16:47:07 2008 -0400
Record rpm macro information
Record used rpm macros into the /etc/rpm/macros.imgcreate so
they persist with the image
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index f8ecdfd..519735e 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -720,6 +720,7 @@ class ImageCreator(object):
kickstart.ServicesConfig(self._instroot).apply(ksh.services)
kickstart.XConfig(self._instroot).apply(ksh.xconfig)
kickstart.NetworkConfig(self._instroot).apply(ksh.network)
+ kickstart.RPMMacroConfig(self._instroot).apply(self.ks)
self._create_bootconfig()
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
index 8444682..7072d51 100644
--- a/imgcreate/kickstart.py
+++ b/imgcreate/kickstart.py
@@ -234,6 +234,22 @@ class XConfig(KickstartConfig):
f.write(buf)
f.close()
+class RPMMacroConfig(KickstartConfig):
+ """A class to apply the specified rpm macros to the filesystem"""
+ def apply(self, ks):
+ if not ks:
+ return
+ f = open(self.path("/etc/rpm/macros.imgcreate"), "w+")
+ if exclude_docs(ks):
+ f.write("%_exludedocs 1\n")
+ if not selinux_enabled(ks):
+ f.write("%__file_context_path %{nil}\n")
+ if inst_langs(ks) != None:
+ f.write("%_install_langs ")
+ f.write(inst_langs(ks))
+ f.write("\n")
+ f.close()
+
class NetworkConfig(KickstartConfig):
"""A class to apply a kickstart network configuration to a system."""
def write_ifcfg(self, network):
commit 39f6ab31a40e9fe9c0f07f5963d00b7f0fc27fa6
Author: Bryan Kearney <bkearney at redhat.com>
Date: Thu Sep 4 15:08:57 2008 -0400
Added logic for the --instLangs %packages option to be used
This patch adds support for the --instLangs option being passed in on the
%packages line
Note that currently, pykickstart sets the option to be instLange not
instLangs. This patch uses the bad option name.
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index d9fa711..f8ecdfd 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -641,6 +641,8 @@ class ImageCreator(object):
rpm.addMacro("_excludedocs", "1")
if not kickstart.selinux_enabled(self.ks):
rpm.addMacro("__file_context_path", "%{nil}")
+ if kickstart.inst_langs(self.ks) != None:
+ rpm.addMacro("_install_langs", kickstart.inst_langs(self.ks))
try:
self.__select_packages(ayum)
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
index 11eac7c..8444682 100644
--- a/imgcreate/kickstart.py
+++ b/imgcreate/kickstart.py
@@ -510,6 +510,9 @@ def ignore_missing(ks):
def exclude_docs(ks):
return ks.handler.packages.excludeDocs
+def inst_langs(ks):
+ return ks.handler.packages.instLange
+
def get_post_scripts(ks):
scripts = []
for s in ks.handler.scripts:
More information about the livecd
mailing list