gather: Don't pull multiple debuginfo packages
When there is a noarch subpackage, all compatible debuginfo would be pulled in, which is not desirable. Example: Server.x86_64 needs pkg.x86_64 and pkg-data.noarch. We only want pkg-debuginfo.x86_64, but without this patch even pkg-debuginfo.i686 would get in. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
5dd6b1b0e7
commit
65078ef9cf
@ -50,9 +50,9 @@ class GatherMethodNodeps(pungi.phases.gather.method.GatherMethodBase):
|
|||||||
pkg = global_pkgset[i]
|
pkg = global_pkgset[i]
|
||||||
if not pkg_is_rpm(pkg):
|
if not pkg_is_rpm(pkg):
|
||||||
continue
|
continue
|
||||||
for gathered_pkg, pkg_arch in packages:
|
|
||||||
if pkg.arch not in valid_arches:
|
if pkg.arch not in valid_arches:
|
||||||
continue
|
continue
|
||||||
|
for gathered_pkg, pkg_arch in packages:
|
||||||
if (type(gathered_pkg) in [str, unicode]
|
if (type(gathered_pkg) in [str, unicode]
|
||||||
and pkg.name != gathered_pkg):
|
and pkg.name != gathered_pkg):
|
||||||
continue
|
continue
|
||||||
@ -86,8 +86,12 @@ class GatherMethodNodeps(pungi.phases.gather.method.GatherMethodBase):
|
|||||||
continue
|
continue
|
||||||
if pkg.sourcerpm not in seen_srpms:
|
if pkg.sourcerpm not in seen_srpms:
|
||||||
continue
|
continue
|
||||||
if not set(compatible_arches[pkg.arch]) & set(seen_srpms[pkg.sourcerpm]):
|
pkg_arches = set(compatible_arches[pkg.arch]) - set(['noarch'])
|
||||||
# this handles stuff like i386 debuginfo in a i686 package
|
seen_arches = set(seen_srpms[pkg.sourcerpm]) - set(['noarch'])
|
||||||
|
if not (pkg_arches & seen_arches):
|
||||||
|
# We only want to pull in a debuginfo if we have a binary
|
||||||
|
# package for a compatible arch. Noarch packages should not
|
||||||
|
# pull debuginfo (they would pull in all architectures).
|
||||||
continue
|
continue
|
||||||
result["debuginfo"].append({
|
result["debuginfo"].append({
|
||||||
"path": pkg.file_path,
|
"path": pkg.file_path,
|
||||||
|
Loading…
Reference in New Issue
Block a user