From 7cb9e9dc20c5adbfe473456b613362164b3a04e7 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Thu, 10 Sep 2015 01:38:09 -0400 Subject: [PATCH] Add support for mirrorlists in DNF gathering code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- bin/pungi-gather | 4 ++-- pungi/dnf_wrapper.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/pungi-gather b/bin/pungi-gather index 89c02a81..5aba2307 100755 --- a/bin/pungi-gather +++ b/bin/pungi-gather @@ -96,12 +96,12 @@ def main(): # HACK: lookaside repos first; this is workaround for no repo priority handling in hawkey if ks_repo.name not in gather_opts.lookaside_repos: continue - dnf_obj.add_repo(ks_repo.name, ks_repo.baseurl) + dnf_obj.add_repo(ks_repo.name, ks_repo.baseurl, ks_repo.mirrorlist) for ks_repo in ksparser.handler.repo.repoList: if ks_repo.name in gather_opts.lookaside_repos: continue - dnf_obj.add_repo(ks_repo.name, ks_repo.baseurl) + dnf_obj.add_repo(ks_repo.name, ks_repo.baseurl, ks_repo.mirrorlist) dnf_obj.fill_sack(load_system_repo=False, load_available_repos=True) dnf_obj.read_comps() diff --git a/pungi/dnf_wrapper.py b/pungi/dnf_wrapper.py index 4ca95a90..7be4482f 100644 --- a/pungi/dnf_wrapper.py +++ b/pungi/dnf_wrapper.py @@ -70,6 +70,7 @@ class DnfWrapper(dnf.Base): repo.baseurl = baseurl repo.mirrorlist = mirrorlist repo.ignoregroups = ignoregroups + repo.enable() self.repos.add(repo) repo.priority = 10 if lookaside else 20