move pkglists to RuntimeBuilder and disable if not debugging
This commit is contained in:
parent
3153bdfa8a
commit
4f7584fe09
@ -188,13 +188,8 @@ class Lorax(BaseLoraxClass):
|
||||
|
||||
buildstamp.write(joinpaths(self.inroot, ".buildstamp"))
|
||||
|
||||
dname = joinpaths(self.workdir, "pkglists")
|
||||
if not os.path.isdir(dname):
|
||||
os.makedirs(dname)
|
||||
for pkgobj in ybo.doPackageLists(pkgnarrow='installed').installed:
|
||||
with open(joinpaths(dname, pkgobj.name), "w") as fobj:
|
||||
for fname in pkgobj.filelist + pkgobj.dirlist:
|
||||
fobj.write("{0}\n".format(fname))
|
||||
if self.debug:
|
||||
rb.writepkglists(joinpaths(self.workdir, "pkglists"))
|
||||
|
||||
logger.info("doing post-install configuration")
|
||||
rb.postinstall()
|
||||
|
@ -80,6 +80,15 @@ class RuntimeBuilder(object):
|
||||
'''Install packages and do initial setup with runtime-install.tmpl'''
|
||||
self._runner.run("runtime-install.tmpl")
|
||||
|
||||
def writepkglists(self, pkglistdir):
|
||||
'''debugging data: write out lists of package contents'''
|
||||
if not os.path.isdir(pkglistdir):
|
||||
os.makedirs(pkglistdir)
|
||||
for pkgobj in self.yum.doPackageLists(pkgnarrow='installed').installed:
|
||||
with open(joinpaths(pkglistdir, pkgobj.name), "w") as fobj:
|
||||
for fname in pkgobj.filelist + pkgobj.dirlist:
|
||||
fobj.write("{0}\n".format(fname))
|
||||
|
||||
def postinstall(self):
|
||||
'''Do some post-install setup work with runtime-postinstall.tmpl'''
|
||||
# copy configdir into runtime root beforehand
|
||||
|
Loading…
Reference in New Issue
Block a user