rename --specfile to --winspec so we can use --specfile for wrapper rpms, for consistency with maven-build
This commit is contained in:
parent
f37b8184e5
commit
68007995d4
3 changed files with 10 additions and 10 deletions
6
cli/koji
6
cli/koji
|
|
@ -4334,9 +4334,9 @@ def handle_win_build(options, session, args):
|
|||
usage += _("\n(Specify the --help global option for a list of other " +
|
||||
"help options)")
|
||||
parser = OptionParser(usage=usage)
|
||||
parser.add_option("--specfile", metavar="URL",
|
||||
parser.add_option("--winspec", metavar="URL",
|
||||
help=_("SCM URL to retrieve the build descriptor from. " + \
|
||||
"Otherwise it must be in the root directory " + \
|
||||
"If not specified, the winspec must be in the root directory " + \
|
||||
"of the source repository."))
|
||||
parser.add_option("--patches", metavar="URL",
|
||||
help=_("SCM URL of a directory containing patches to apply " + \
|
||||
|
|
@ -4381,7 +4381,7 @@ def handle_win_build(options, session, args):
|
|||
scmurl = args[1]
|
||||
vm_name = args[2]
|
||||
opts = {}
|
||||
for key in ('specfile', 'patches', 'cpus', 'mem',
|
||||
for key in ('winspec', 'patches', 'cpus', 'mem',
|
||||
'scratch', 'repo_id', 'skip_tag'):
|
||||
val = getattr(build_opts, key)
|
||||
if val is not None:
|
||||
|
|
|
|||
10
vm/kojikamid
10
vm/kojikamid
|
|
@ -211,7 +211,7 @@ class SCM(object):
|
|||
update_checkout_cmd = ['git', 'reset', '--hard', self.revision]
|
||||
update_checkout_dir = sourcedir
|
||||
|
||||
# self.module may be empty, in which case the specfile should be in the top-level directory
|
||||
# self.module may be empty, in which case the winspec should be in the top-level directory
|
||||
if self.module:
|
||||
# Treat the module as a directory inside the git repository
|
||||
sourcedir = '%s/%s' % (sourcedir, self.module)
|
||||
|
|
@ -231,7 +231,7 @@ class SCM(object):
|
|||
update_checkout_cmd = ['git', 'reset', '--hard', self.revision]
|
||||
update_checkout_dir = sourcedir
|
||||
|
||||
# self.module may be empty, in which case the specfile should be in the top-level directory
|
||||
# self.module may be empty, in which case the winspec should be in the top-level directory
|
||||
if self.module:
|
||||
# Treat the module as a directory inside the git repository
|
||||
sourcedir = '%s/%s' % (sourcedir, self.module)
|
||||
|
|
@ -370,11 +370,11 @@ class WindowsBuild(object):
|
|||
raise BuildError, '%s appears to be missing, is ClamAV installed?' % clam_tool
|
||||
|
||||
def checkout(self):
|
||||
"""Checkout sources, specfile, and patches, and apply patches"""
|
||||
"""Checkout sources, winspec, and patches, and apply patches"""
|
||||
src_scm = SCM(self.source_url)
|
||||
self.source_dir = src_scm.checkout(ensuredir(os.path.join(self.workdir, 'source')))
|
||||
if 'specfile' in self.task_opts:
|
||||
spec_scm = SCM(self.task_opts['specfile'])
|
||||
if 'winspec' in self.task_opts:
|
||||
spec_scm = SCM(self.task_opts['winspec'])
|
||||
self.spec_dir = spec_scm.checkout(ensuredir(os.path.join(self.workdir, 'spec')))
|
||||
else:
|
||||
self.spec_dir = self.source_dir
|
||||
|
|
|
|||
|
|
@ -285,9 +285,9 @@ class WinBuildTask(BaseTaskHandler):
|
|||
if not opts:
|
||||
opts = {}
|
||||
|
||||
subopts = koji.util.dslice(opts, ['specfile', 'patches'],
|
||||
subopts = koji.util.dslice(opts, ['winspec', 'patches'],
|
||||
strict=False)
|
||||
# specfile and patches options are urls
|
||||
# winspec and patches options are urls
|
||||
# verify the urls before passing them to the VM
|
||||
for url in [source_url] + subopts.values():
|
||||
scm = SCM(url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue