fix up some issues with --no-dvd and --workbasedir

This commit is contained in:
Dennis Gilmore 2014-07-23 07:41:10 -05:00
parent 9d339e774b
commit 5c9d28dc9f
3 changed files with 13 additions and 9 deletions

View File

@ -52,6 +52,8 @@ def main():
config.set('pungi', 'force', str(opts.force))
if config.get('pungi', 'workdirbase') == '/work':
config.set('pungi', 'workdirbase', "%s/work" % config.get('pungi', 'destdir'))
# Set up our directories
if not os.path.exists(config.get('pungi', 'destdir')):
try:
@ -104,6 +106,8 @@ def main():
config.set('pungi', 'multilib', " ".join(opts.multilib))
if opts.lookaside_repos:
config.set('pungi', 'lookaside_repos', " ".join(opts.lookaside_repos))
if opts.no_dvd:
config.set('pungi', 'no_dvd', "True")
config.set("pungi", "fulltree", str(bool(opts.fulltree)))
config.set("pungi", "selfhosting", str(bool(opts.selfhosting)))
config.set("pungi", "nosource", str(bool(opts.nosource)))

View File

@ -1619,17 +1619,17 @@ class Pungi(pypungi.PungiBase):
else:
extraargs.append(os.path.join(self.archdir, 'SRPMS'))
if not self.config.get('pungi', 'no_dvd'):
if self.config.get('pungi', 'no_dvd') == "False":
# run the command
pypungi.util._doRunCommand(mkisofs + extraargs, self.logger)
# Run isohybrid on the iso as long as its not the source iso
if os.path.exists("/usr/bin/isohybrid") and not self.tree_arch == 'source':
pypungi.util._doRunCommand(isohybrid, self.logger)
# Run isohybrid on the iso as long as its not the source iso
if os.path.exists("/usr/bin/isohybrid") and not self.tree_arch == 'source':
pypungi.util._doRunCommand(isohybrid, self.logger)
# implant md5 for mediacheck on all but source arches
if not self.tree_arch == 'source':
pypungi.util._doRunCommand(['/usr/bin/implantisomd5', isofile], self.logger)
# implant md5 for mediacheck on all but source arches
if not self.tree_arch == 'source':
pypungi.util._doRunCommand(['/usr/bin/implantisomd5', isofile], self.logger)
# shove the checksum into a file
csumfile = os.path.join(self.isodir, '%s-%s-%s-CHECKSUM' % (
@ -1641,7 +1641,7 @@ class Pungi(pypungi.PungiBase):
file = open(csumfile, 'w')
file.write('# The image checksum(s) are generated with sha256sum.\n')
file.close()
if not self.config.get('pungi', 'no_dvd'):
if self.config.get('pungi', 'no_dvd') == "False":
self._doIsoChecksum(isofile, csumfile)
# Write out a line describing the media

View File

@ -40,7 +40,7 @@ class Config(SafeConfigParser):
self.set('pungi', 'version', time.strftime('%Y%m%d', time.localtime()))
self.set('pungi', 'flavor', '')
self.set('pungi', 'destdir', os.getcwd())
self.set('pungi', 'workdirbase', "%s/work" % self.get('pungi', 'destdir'))
self.set('pungi', 'workdirbase', "/work")
self.set('pungi', 'bugurl', 'https://bugzilla.redhat.com')
self.set('pungi', 'cdsize', '695.0')
self.set('pungi', 'debuginfo', "True")