From 36c629a262c38b07cae1c280fefb9bf7058d47a1 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 28 Jul 2007 10:59:14 -0400 Subject: [PATCH] split createrepo to it's own call --- Changelog | 3 +++ pungi | 9 +++++++-- pypungi/pungi.py | 10 +++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Changelog b/Changelog index 4925622a..1d4480f9 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +* Sat Jul 28 2007 Jesse Keating +- Split the createrepo call into it's own function + * Tue Jul 24 2007 Jesse Keating - Add a few more desktopy things to manifest - Rename f7 files to f8; set up config files for f8test1 diff --git a/pungi b/pungi index ce9c113e..b49d2eb0 100755 --- a/pungi +++ b/pungi @@ -111,6 +111,9 @@ def main(): mypungi = pypungi.pungi.Pungi(config) + if opts.do_all or opts.do_createrepo: + mypungi.doCreaterepo() + if opts.do_all or opts.do_buildinstall: mypungi.doBuildinstall() mypungi.doGetRelnotes() @@ -144,7 +147,7 @@ if __name__ == '__main__': import sys def get_arguments(): - parser = OptionParser(version="%prog 0.3.9") + parser = OptionParser(version="%prog 0.4.0") parser.add_option("--destdir", default="*CONFFILE*", dest="destdir", help='destination directory (defaults to current directory)') parser.add_option("-c", "--conf", default='/etc/pungi/pungi.conf', dest="config", @@ -153,6 +156,8 @@ if __name__ == '__main__': help="Enable ALL stages") parser.add_option("-G", action="store_true", default=False, dest="do_gather", help="Flag to enable processing the Gather stage") + parser.add_option("-C", action="store_true", default=False, dest="do_createrepo", + help="Flag to enable processing the Createrepo stage") parser.add_option("-B", action="store_true", default=False, dest="do_buildinstall", help="Flag to enable processing the BuildInstall stage") parser.add_option("-P", action="store_true", default=False, dest="do_packageorder", @@ -164,7 +169,7 @@ if __name__ == '__main__': (opts, args) = parser.parse_args() - if opts.do_gather or opts.do_buildinstall or opts.do_packageorder or opts.do_splittree or opts.do_createiso: + if opts.do_gather or opts.do_createrepo or opts.do_buildinstall or opts.do_packageorder or opts.do_splittree or opts.do_createiso: opts.do_all = False if len(sys.argv) < 2: parser.print_help() diff --git a/pypungi/pungi.py b/pypungi/pungi.py index da250df7..64583a5d 100755 --- a/pypungi/pungi.py +++ b/pypungi/pungi.py @@ -79,11 +79,11 @@ class Pungi: log.error(err) raise OSError, "Got an error from %s" % command[0] - def doBuildinstall(self): - """Run anaconda-runtime's buildinstall on the tree.""" + def doCreaterepo(self): + """Run createrepo to generate repodata in the tree.""" - # create repodata for the tree + # setup the createrepo call createrepo = ['/usr/bin/createrepo'] createrepo.append('--database') @@ -95,6 +95,10 @@ class Pungi: # run the command self._doRunCommand(createrepo, rundir=self.topdir) + def doBuildinstall(self): + """Run anaconda-runtime's buildinstall on the tree.""" + + # setup the buildinstall call buildinstall = ['/usr/lib/anaconda-runtime/buildinstall'] #buildinstall.append('TMPDIR=%s' % self.workdir) # TMPDIR broken in buildinstall