From a313fa8214cf056ff5115438b5ee3db05da3d9a1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 18 Jul 2014 14:30:52 -0500 Subject: [PATCH] add a flag to turn off making install DVD's --- src/bin/pungi.py | 2 ++ src/pypungi/__init__.py | 12 +++++++----- src/pypungi/config.py | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/bin/pungi.py b/src/bin/pungi.py index 6cb3103b..f97555fa 100755 --- a/src/bin/pungi.py +++ b/src/bin/pungi.py @@ -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') diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py index e8cdf964..67c70226 100644 --- a/src/pypungi/__init__.py +++ b/src/pypungi/__init__.py @@ -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 \ diff --git a/src/pypungi/config.py b/src/pypungi/config.py index e0bcf6fc..edfc2cf2 100644 --- a/src/pypungi/config.py +++ b/src/pypungi/config.py @@ -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")