gather: Skip lookaside packages from local lookaside repo

When variant X depends on variant A, Pungi creates a temporary local
lookaside with packages from A. If there's an external lookaside
configured, the list of package for variant A can contain URLs to the
external repo.

Newer versions of createrepo fail when pkglist specifies an unreachable
package, and it doesn't do downloading.

JIRA: RHELCMP-13648
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit 4a5106375e)
This commit is contained in:
Lubomír Sedlář 2024-04-23 08:47:30 +02:00 committed by Stepan Oksanichenko
parent 9d6226b436
commit 6223baa2ba
Signed by: soksanichenko
GPG Key ID: AB9983172AB1E45B

View File

@ -666,6 +666,11 @@ def _make_lookaside_repo(compose, variant, arch, pkg_map, package_sets=None):
# we need a union of all SRPMs. # we need a union of all SRPMs.
if pkg_type == "srpm" or pkg_arch == arch: if pkg_type == "srpm" or pkg_arch == arch:
for pkg in packages: for pkg in packages:
if "lookaside" in pkg.get("flags", []):
# We want to ignore lookaside packages, those will
# be visible to the depending variants from the
# lookaside repo directly.
continue
pkg = pkg["path"] pkg = pkg["path"]
if path_prefix and pkg.startswith(path_prefix): if path_prefix and pkg.startswith(path_prefix):
pkg = pkg[len(path_prefix) :] pkg = pkg[len(path_prefix) :]