split createrepo to it's own call
This commit is contained in:
parent
99e2ac017e
commit
36c629a262
@ -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>
|
* Tue Jul 24 2007 Jesse Keating <jkeating@redhat.com>
|
||||||
- Add a few more desktopy things to manifest
|
- Add a few more desktopy things to manifest
|
||||||
- Rename f7 files to f8; set up config files for f8test1
|
- Rename f7 files to f8; set up config files for f8test1
|
||||||
|
9
pungi
9
pungi
@ -111,6 +111,9 @@ def main():
|
|||||||
|
|
||||||
mypungi = pypungi.pungi.Pungi(config)
|
mypungi = pypungi.pungi.Pungi(config)
|
||||||
|
|
||||||
|
if opts.do_all or opts.do_createrepo:
|
||||||
|
mypungi.doCreaterepo()
|
||||||
|
|
||||||
if opts.do_all or opts.do_buildinstall:
|
if opts.do_all or opts.do_buildinstall:
|
||||||
mypungi.doBuildinstall()
|
mypungi.doBuildinstall()
|
||||||
mypungi.doGetRelnotes()
|
mypungi.doGetRelnotes()
|
||||||
@ -144,7 +147,7 @@ if __name__ == '__main__':
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
def get_arguments():
|
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",
|
parser.add_option("--destdir", default="*CONFFILE*", dest="destdir",
|
||||||
help='destination directory (defaults to current directory)')
|
help='destination directory (defaults to current directory)')
|
||||||
parser.add_option("-c", "--conf", default='/etc/pungi/pungi.conf', dest="config",
|
parser.add_option("-c", "--conf", default='/etc/pungi/pungi.conf', dest="config",
|
||||||
@ -153,6 +156,8 @@ if __name__ == '__main__':
|
|||||||
help="Enable ALL stages")
|
help="Enable ALL stages")
|
||||||
parser.add_option("-G", action="store_true", default=False, dest="do_gather",
|
parser.add_option("-G", action="store_true", default=False, dest="do_gather",
|
||||||
help="Flag to enable processing the Gather stage")
|
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",
|
parser.add_option("-B", action="store_true", default=False, dest="do_buildinstall",
|
||||||
help="Flag to enable processing the BuildInstall stage")
|
help="Flag to enable processing the BuildInstall stage")
|
||||||
parser.add_option("-P", action="store_true", default=False, dest="do_packageorder",
|
parser.add_option("-P", action="store_true", default=False, dest="do_packageorder",
|
||||||
@ -164,7 +169,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
|
|
||||||
(opts, args) = parser.parse_args()
|
(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
|
opts.do_all = False
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
|
@ -79,11 +79,11 @@ class Pungi:
|
|||||||
log.error(err)
|
log.error(err)
|
||||||
raise OSError, "Got an error from %s" % command[0]
|
raise OSError, "Got an error from %s" % command[0]
|
||||||
|
|
||||||
def doBuildinstall(self):
|
def doCreaterepo(self):
|
||||||
"""Run anaconda-runtime's buildinstall on the tree."""
|
"""Run createrepo to generate repodata in the tree."""
|
||||||
|
|
||||||
|
|
||||||
# create repodata for the tree
|
# setup the createrepo call
|
||||||
createrepo = ['/usr/bin/createrepo']
|
createrepo = ['/usr/bin/createrepo']
|
||||||
createrepo.append('--database')
|
createrepo.append('--database')
|
||||||
|
|
||||||
@ -95,6 +95,10 @@ class Pungi:
|
|||||||
# run the command
|
# run the command
|
||||||
self._doRunCommand(createrepo, rundir=self.topdir)
|
self._doRunCommand(createrepo, rundir=self.topdir)
|
||||||
|
|
||||||
|
def doBuildinstall(self):
|
||||||
|
"""Run anaconda-runtime's buildinstall on the tree."""
|
||||||
|
|
||||||
|
|
||||||
# setup the buildinstall call
|
# setup the buildinstall call
|
||||||
buildinstall = ['/usr/lib/anaconda-runtime/buildinstall']
|
buildinstall = ['/usr/lib/anaconda-runtime/buildinstall']
|
||||||
#buildinstall.append('TMPDIR=%s' % self.workdir) # TMPDIR broken in buildinstall
|
#buildinstall.append('TMPDIR=%s' % self.workdir) # TMPDIR broken in buildinstall
|
||||||
|
Loading…
Reference in New Issue
Block a user