split createrepo to it's own call

This commit is contained in:
Jesse Keating 2007-07-28 10:59:14 -04:00 committed by Jesse Keating
parent 99e2ac017e
commit 36c629a262
3 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,6 @@
* Sat Jul 28 2007 Jesse Keating <jkeating@redhat.com>
- Split the createrepo call into it's own function
* Tue Jul 24 2007 Jesse Keating <jkeating@redhat.com>
- Add a few more desktopy things to manifest
- Rename f7 files to f8; set up config files for f8test1

9
pungi
View File

@ -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()

View File

@ -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