Add buildarch variable to template
This commit is contained in:
parent
e1218111b1
commit
688b4aa5ae
@ -212,8 +212,9 @@ class Lorax(BaseLoraxClass):
|
|||||||
self.conf.get("templates", "ramdisk"))
|
self.conf.get("templates", "ramdisk"))
|
||||||
|
|
||||||
tvars = { "basearch": self.basearch,
|
tvars = { "basearch": self.basearch,
|
||||||
"libdir" : self.libdir,
|
"buildarch": self.buildarch,
|
||||||
"product": self.product.lower() }
|
"libdir" : self.libdir,
|
||||||
|
"product": self.product.lower() }
|
||||||
|
|
||||||
template = ltmpl.LoraxTemplate()
|
template = ltmpl.LoraxTemplate()
|
||||||
template = template.parse(tfile, tvars)
|
template = template.parse(tfile, tvars)
|
||||||
@ -235,10 +236,13 @@ class Lorax(BaseLoraxClass):
|
|||||||
buildstamp.write()
|
buildstamp.write()
|
||||||
shutil.copy2(buildstamp.path, self.installtree.root)
|
shutil.copy2(buildstamp.path, self.installtree.root)
|
||||||
|
|
||||||
# save list of installed packages
|
# DEBUG save list of installed packages
|
||||||
with open(joinpaths(self.workdir, "packages"), "w") as fobj:
|
dname = joinpaths(self.workdir, "pkglists")
|
||||||
for pkgname in self.installtree.yum.installed_packages:
|
os.makedirs(dname)
|
||||||
fobj.write("{0}\n".format(pkgname))
|
for pkgname, pkgobj in self.installtree.yum.installed_packages.items():
|
||||||
|
with open(joinpaths(dname, pkgname), "w") as fobj:
|
||||||
|
for fname in pkgobj.filelist:
|
||||||
|
fobj.write("{0}\n".format(fname))
|
||||||
|
|
||||||
# remove locales
|
# remove locales
|
||||||
logger.info("removing locales")
|
logger.info("removing locales")
|
||||||
|
Loading…
Reference in New Issue
Block a user