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)) 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 # Set up our directories
if not os.path.exists(config.get('pungi', 'destdir')): if not os.path.exists(config.get('pungi', 'destdir')):
try: try:
@ -104,6 +106,8 @@ def main():
config.set('pungi', 'multilib', " ".join(opts.multilib)) config.set('pungi', 'multilib', " ".join(opts.multilib))
if opts.lookaside_repos: if opts.lookaside_repos:
config.set('pungi', 'lookaside_repos', " ".join(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", "fulltree", str(bool(opts.fulltree)))
config.set("pungi", "selfhosting", str(bool(opts.selfhosting))) config.set("pungi", "selfhosting", str(bool(opts.selfhosting)))
config.set("pungi", "nosource", str(bool(opts.nosource))) config.set("pungi", "nosource", str(bool(opts.nosource)))

View File

@ -1619,7 +1619,7 @@ class Pungi(pypungi.PungiBase):
else: else:
extraargs.append(os.path.join(self.archdir, 'SRPMS')) 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 # run the command
pypungi.util._doRunCommand(mkisofs + extraargs, self.logger) pypungi.util._doRunCommand(mkisofs + extraargs, self.logger)
@ -1641,7 +1641,7 @@ class Pungi(pypungi.PungiBase):
file = open(csumfile, 'w') file = open(csumfile, 'w')
file.write('# The image checksum(s) are generated with sha256sum.\n') file.write('# The image checksum(s) are generated with sha256sum.\n')
file.close() file.close()
if not self.config.get('pungi', 'no_dvd'): if self.config.get('pungi', 'no_dvd') == "False":
self._doIsoChecksum(isofile, csumfile) self._doIsoChecksum(isofile, csumfile)
# Write out a line describing the media # 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', 'version', time.strftime('%Y%m%d', time.localtime()))
self.set('pungi', 'flavor', '') self.set('pungi', 'flavor', '')
self.set('pungi', 'destdir', os.getcwd()) 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', 'bugurl', 'https://bugzilla.redhat.com')
self.set('pungi', 'cdsize', '695.0') self.set('pungi', 'cdsize', '695.0')
self.set('pungi', 'debuginfo', "True") self.set('pungi', 'debuginfo', "True")