Add --nomacboot option

sotime an OS would want to disable booting on mac machines. For
instance when buildinga RHEL clone where there is no hfs support.
The option disables mac support
This commit is contained in:
Connie Sieh 2014-12-22 14:07:24 -06:00 committed by Dennis Gilmore
parent fedc440159
commit 274236a3f3
3 changed files with 8 additions and 1 deletions

View File

@ -108,6 +108,8 @@ def main():
config.set('pungi', 'lookaside_repos', " ".join(opts.lookaside_repos))
if opts.no_dvd:
config.set('pungi', 'no_dvd', "True")
if opts.nomacboot:
config.set('pungi', 'nomacboot', "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)))
@ -289,6 +291,7 @@ if __name__ == '__main__':
parser.add_option("--relnotefilere", dest="relnotefilere", type="string",
action="callback", callback=set_config, callback_args=(config, ),
help='Which files are the release notes -- GPL EULA')
parser.add_option("--nomacboot", action="store_true", dest="nomacboot", help='disable setting up macboot as no hfs support ')
(opts, args) = parser.parse_args()

View File

@ -1401,6 +1401,9 @@ class Pungi(pypungi.PungiBase):
# Only supported mac hardware is x86 make sure we only enable mac support on arches that need it
if self.tree_arch in ['x86_64']:
if self.config.getboolean('pungi','nomacboot'):
domacboot = False
else:
domacboot = True
else:
domacboot = False

View File

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