add a flag to turn off making install DVD's

This commit is contained in:
Dennis Gilmore 2014-07-18 14:30:52 -05:00
parent 6820ad7c23
commit a313fa8214
3 changed files with 10 additions and 5 deletions

View File

@ -254,6 +254,8 @@ if __name__ == '__main__':
parser.add_option("--workdirbase", dest="workdirbase", type="string",
action="callback", callback=set_config, callback_args=(config, ),
help='base working directory (defaults to destdir + /work)')
parser.add_option("--no-dvd", default=False, action="store_true", dest="no_dvd",
help='Do not make a install DVD/CD only the netinstall image and the tree')
parser.add_option("-c", "--config", dest="config",
help='Path to kickstart config file')

View File

@ -1619,8 +1619,9 @@ class Pungi(pypungi.PungiBase):
else:
extraargs.append(os.path.join(self.archdir, 'SRPMS'))
# run the command
pypungi.util._doRunCommand(mkisofs + extraargs, self.logger)
if not self.config.get('pungi', 'no_dvd'):
# 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':
@ -1640,10 +1641,11 @@ class Pungi(pypungi.PungiBase):
file = open(csumfile, 'w')
file.write('# The image checksum(s) are generated with sha256sum.\n')
file.close()
self._doIsoChecksum(isofile, csumfile)
if not self.config.get('pungi', 'no_dvd'):
self._doIsoChecksum(isofile, csumfile)
# Write out a line describing the media
self.writeinfo('media: %s' % self.mkrelative(isofile))
# Write out a line describing the media
self.writeinfo('media: %s' % self.mkrelative(isofile))
# Now link the boot iso
if not self.tree_arch == 'source' and \

View File

@ -51,3 +51,4 @@ class Config(SafeConfigParser):
self.set('pungi', 'multilib', '')
self.set('pungi', 'lookaside_repos', '')
self.set('pungi', 'resolve_deps', "True")
self.set('pungi', 'no_dvd', "False")