From b561e2a77de5dc5ea850ac5e2e998962c395b2d9 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: May 16 2016 18:02:07 +0000 Subject: inject install tree url for livemedia spins --- diff --git a/builder/kojid b/builder/kojid index 5abab35..b98713f 100755 --- a/builder/kojid +++ b/builder/kojid @@ -2611,6 +2611,9 @@ class ImageTask(BaseTaskHandler): baseurl = '%s/%s' % (repopath, arch) self.logger.debug('BASEURL: %s' % baseurl) self.ks.handler.repo.repoList.append(repo_class(baseurl=baseurl, name='koji-%s-%i' % (target_info['build_tag_name'], repo_info['id']))) + #inject url if provided + if opts.get('install_tree_url'): + self.ks.handler.url.url = opts['install_tree_url'] # Write out the new ks file. Note that things may not be in the same # order and comments in the original ks file may be lost. diff --git a/cli/koji b/cli/koji index 1ed18d2..560883f 100755 --- a/cli/koji +++ b/cli/koji @@ -5246,6 +5246,8 @@ def handle_spin_livemedia(options, session, args): help=_("Run the livemedia creation task at a lower priority")) parser.add_option("--ksurl", metavar="SCMURL", help=_("The URL to the SCM containing the kickstart file")) + parser.add_option("--install-tree-url", metavar="URL", + help=_("Provide the URL for the install tree")) parser.add_option("--ksversion", metavar="VERSION", help=_("The syntax version used in the kickstart file")) parser.add_option("--scratch", action="store_true", @@ -5639,7 +5641,7 @@ def _build_image(options, task_opts, session, args, img_type): passthru_opts = [ 'isoname', 'ksurl', 'ksversion', 'scratch', 'repo', 'release', 'skip_tag', 'vmem', 'vcpu', 'format', 'specfile', - 'title', + 'title', 'install_tree_url', ] hub_opts = {} for opt in passthru_opts: