index external rpm origins by nvra, not just nvr

This commit is contained in:
Mike McLean 2009-04-21 14:31:55 -04:00
parent 12d0187c8d
commit 3a1234efe0

View file

@ -586,14 +586,16 @@ class BuildRoot(object):
if len(parts) < 2:
continue
#first field is formated by yum as [e:]n-v-r.a
nvra = "%(name)s-%(version)s-%(release)s" % koji.parse_NVRA(parts[0])
nvra = "%(name)s-%(version)s-%(release)s.%(arch)s" % koji.parse_NVRA(parts[0])
origin_idx[nvra] = parts[1]
fo2.close()
# mergerepo starts from a local repo in the task workdir, so internal
# rpms have an odd-looking origin that we need to look for
localtail = '/repo_%s_premerge/' % self.repo_info['id']
for rpm_info in rpmlist:
key = "%(name)s-%(version)s-%(release)s" % rpm_info
key = "%(name)s-%(version)s-%(release)s.%(arch)s" % rpm_info
# src rpms should not show up in rpmlist so we do not have to
# worry about fixing the arch for them
ext_url = origin_idx.get(key)
if not ext_url:
raise koji.BuildError, "No origin for %s" % key