From 5a498f80b6989ae9c939503a8941dca4b1227675 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 30 Jan 2017 04:34:07 -0600 Subject: [PATCH] use koji --profile when calling koji for livemedia take the profile from the koji config and apply it to the koji cli when building livemedia Signed-off-by: Dennis Gilmore --- pungi/wrappers/kojiwrapper.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pungi/wrappers/kojiwrapper.py b/pungi/wrappers/kojiwrapper.py index bca9e649..8b32a1eb 100644 --- a/pungi/wrappers/kojiwrapper.py +++ b/pungi/wrappers/kojiwrapper.py @@ -164,14 +164,19 @@ class KojiWrapper(object): return cmd def get_live_media_cmd(self, options, wait=True): - # Usage: koji spin-livemedia [options] - cmd = ['koji', 'spin-livemedia'] + # Usage: koji --profile= spin-livemedia [options] + cmd = ['koji'] + + if 'koji_profile' not in options: + raise ValueError('Expected options to have key "koji_profile"') + cmd.append('--profile=%s' % options['koji_profile']) + + cmd.append('spin-livemedia') for key in ('name', 'version', 'target', 'arch', 'ksfile'): if key not in options: raise ValueError('Expected options to have key "%s"' % key) cmd.append(options[key]) - if 'install_tree' not in options: raise ValueError('Expected options to have key "install_tree"') cmd.append('--install-tree=%s' % options['install_tree'])