Skip to content

Commit

Permalink
Don't pass build_tag as separate argument to createContainer task
Browse files Browse the repository at this point in the history
We can get it from target_info.
  • Loading branch information
pbabinca committed Jun 8, 2015
1 parent 17fe887 commit 498501b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions koji_containerbuild/plugins/builder_containerbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _rpm_package_info(self, parts):
rpm['epoch'] = int(parts[4])
return rpm

def handler(self, src, target_info, build_tag, arch, scratch=False):
def handler(self, src, target_info, arch, scratch=False):
this_task = self.session.getTaskInfo(self.id)
self.logger.debug("This task: %r", this_task)
owner_info = self.session.getUser(this_task['owner'])
Expand Down Expand Up @@ -175,7 +175,8 @@ def handler(self, src, target_info, build_tag, arch, scratch=False):
# TODO: copied from image build
# TODO: hack to make this work for now, need to refactor
if scratch:
br = kojid.BuildRoot(self.session, self.options, build_tag, arch,
br = kojid.BuildRoot(self.session, self.options,
target_info['build_tag'], arch,
self.id, repo_id=repo_info['id'])
br.markExternalRPMs(rpmlist)
# TODO: I'm not sure if this is ok
Expand Down Expand Up @@ -234,13 +235,12 @@ def initContainerBuild(self, name, version, release, target_info, opts):
release=release,
epoch=0))

def runBuilds(self, src, target_info, build_tag, arches, scratch=False):
def runBuilds(self, src, target_info, arches, scratch=False):
subtasks = {}
for arch in arches:
subtasks[arch] = self.session.host.subtask(method='createContainer',
arglist=[src,
target_info,
build_tag,
arch,
scratch],
label='container',
Expand Down Expand Up @@ -325,7 +325,7 @@ def handler(self, src, target, opts=None):
"target": target}
if not SCM.is_scm_url(src):
raise koji.BuildError('Invalid source specification: %s' % src)
results = self.runBuilds(src, target_info, build_tag, archlist,
results = self.runBuilds(src, target_info, archlist,
opts.get('scratch', False))
results_xmlrpc = {}
for task_id, result in results.items():
Expand Down

0 comments on commit 498501b

Please sign in to comment.