From 9986ab582a6fbe62f72c2f1c329db484d45064f9 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 7 Mar 2007 17:53:53 -0500 Subject: [PATCH] - Call createrepo ourselves for the tree, not buildinstall's job --- Changelog | 3 +++ pypungi/pungi.py | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index f82308ca..030ca0a9 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +* Wed Mar 07 2007 Jesse Keating +- Call createrepo ourselves for the tree, not buildinstall's job + * Tue Mar 06 2007 Jesse Keating - Convert from commands to subprocess for things we call out diff --git a/pypungi/pungi.py b/pypungi/pungi.py index 9279e7f4..08abf6ef 100755 --- a/pypungi/pungi.py +++ b/pypungi/pungi.py @@ -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']