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"))
|
buildstamp.write(joinpaths(self.inroot, ".buildstamp"))
|
||||||
|
|
||||||
dname = joinpaths(self.workdir, "pkglists")
|
if self.debug:
|
||||||
if not os.path.isdir(dname):
|
rb.writepkglists(joinpaths(self.workdir, "pkglists"))
|
||||||
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))
|
|
||||||
|
|
||||||
logger.info("doing post-install configuration")
|
logger.info("doing post-install configuration")
|
||||||
rb.postinstall()
|
rb.postinstall()
|
||||||
|
@ -80,6 +80,15 @@ class RuntimeBuilder(object):
|
|||||||
'''Install packages and do initial setup with runtime-install.tmpl'''
|
'''Install packages and do initial setup with runtime-install.tmpl'''
|
||||||
self._runner.run("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):
|
def postinstall(self):
|
||||||
'''Do some post-install setup work with runtime-postinstall.tmpl'''
|
'''Do some post-install setup work with runtime-postinstall.tmpl'''
|
||||||
# copy configdir into runtime root beforehand
|
# copy configdir into runtime root beforehand
|
||||||
|
Loading…
Reference in New Issue
Block a user