From 604ec40c8ebc7af1e7c539aab203c05cd39cb69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 3 Oct 2018 12:20:55 +0200 Subject: [PATCH] gather: Work with repos without location_base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A repo does not necessarily have the location_base attribute if the packages are next to the repodata. This can easily happen for lookaside repos. Signed-off-by: Lubomír Sedlář --- pungi/phases/gather/methods/method_hybrid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pungi/phases/gather/methods/method_hybrid.py b/pungi/phases/gather/methods/method_hybrid.py index 4e469df4..7fd95307 100644 --- a/pungi/phases/gather/methods/method_hybrid.py +++ b/pungi/phases/gather/methods/method_hybrid.py @@ -399,7 +399,7 @@ def expand_packages(nevra_to_pkg, variant_modules, lookasides, nvrs): md.locate_and_load_xml(repo) for key in md.keys(): pkg = md.get(key) - url = os.path.join(pkg.location_base, pkg.location_href) + url = os.path.join(pkg.location_base or repo, pkg.location_href) # Strip file:// prefix lookaside_packages.add(url[7:])