Add support for mirrorlists in DNF gathering code.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Daniel Mach 2015-09-10 01:38:09 -04:00 committed by Lubomír Sedlář
parent ddba26edd7
commit 7cb9e9dc20
2 changed files with 3 additions and 2 deletions

View File

@ -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()

View File

@ -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