- Call createrepo ourselves for the tree, not buildinstall's job

This commit is contained in:
Jesse Keating 2007-03-07 17:53:53 -05:00 committed by Jesse Keating
parent 4e8d70bf9f
commit 9986ab582a
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,6 @@
* Wed Mar 07 2007 Jesse Keating <jkeating@redhat.com>
- Call createrepo ourselves for the tree, not buildinstall's job
* Tue Mar 06 2007 Jesse Keating <jkeating@redhat.com>
- Convert from commands to subprocess for things we call out

View File

@ -67,10 +67,19 @@ class Pungi:
"""Run anaconda-runtime's buildinstall on the tree."""
# buildinstall looks for a comps file in base/ for now, copy it into place
os.makedirs(os.path.join(self.topdir, self.config.get('default', 'product_path'), 'base'))
shutil.copy(self.config.get('default', 'comps'), os.path.join(self.topdir,
self.config.get('default', 'product_path'), 'base', 'comps.xml'))
# create repodata for the tree
createrepo = ['/usr/bin/createrepo']
createrepo.append('--database')
createrepo.append('--groupfile')
createrepo.append(self.config.get('default', 'comps'))
createrepo.append(self.topdir)
# run the command
subprocess.check_call(createrepo, cwd=self.topdir)
# log something here
# setup the buildinstall call
buildinstall = ['/usr/lib/anaconda-runtime/buildinstall']