Skip to content

Commit

Permalink
permit to use the ExclusiveArch tag
Browse files Browse the repository at this point in the history
  • Loading branch information
xning committed Dec 1, 2016
1 parent 1efdcb3 commit 950a48c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions builder/kojid
Expand Up @@ -970,19 +970,20 @@ class BuildTask(BaseTaskHandler):
exclusivearch = h[rpm.RPMTAG_EXCLUSIVEARCH]
excludearch = h[rpm.RPMTAG_EXCLUDEARCH]

if arch in buildarchs and \
len(buildarchs) == 1 and \
not exclusivearch and \
excludearch and \
arch not in excludearch:
exclusivearch = [a for a in exclusivearch if a != 'noarch']
if (arch in buildarchs and len(buildarchs) == 1 and
(exclusivearch or excludearch)):
self.logger.debug('find semi-noarch package')
buildconfig = self.session.getBuildConfig(build_tag, event=self.event_id)
arches = buildconfig['arches']
tag_archlist = [koji.canonArch(a) for a in arches.split()]
if extra:
arches = "%s %s" % (arches,extra)

archlist = [a for a in arches.split() if a not in excludearch]
if exclusivearch:
archlist = [a for a in exclusivearch if a not in excludearch]
else:
archlist = [a for a in arches.split() if a not in excludearch]
archlist = [a for a in archlist if koji.canonArch(a) in tag_archlist]
if not archlist:
raise koji.BuildError, "No matching arches were found to build this semi-noarch package"
Expand Down

0 comments on commit 950a48c

Please sign in to comment.