Add support for mirrorlists in DNF gathering code.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
ddba26edd7
commit
7cb9e9dc20
@ -96,12 +96,12 @@ def main():
|
|||||||
# HACK: lookaside repos first; this is workaround for no repo priority handling in hawkey
|
# HACK: lookaside repos first; this is workaround for no repo priority handling in hawkey
|
||||||
if ks_repo.name not in gather_opts.lookaside_repos:
|
if ks_repo.name not in gather_opts.lookaside_repos:
|
||||||
continue
|
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:
|
for ks_repo in ksparser.handler.repo.repoList:
|
||||||
if ks_repo.name in gather_opts.lookaside_repos:
|
if ks_repo.name in gather_opts.lookaside_repos:
|
||||||
continue
|
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.fill_sack(load_system_repo=False, load_available_repos=True)
|
||||||
dnf_obj.read_comps()
|
dnf_obj.read_comps()
|
||||||
|
@ -70,6 +70,7 @@ class DnfWrapper(dnf.Base):
|
|||||||
repo.baseurl = baseurl
|
repo.baseurl = baseurl
|
||||||
repo.mirrorlist = mirrorlist
|
repo.mirrorlist = mirrorlist
|
||||||
repo.ignoregroups = ignoregroups
|
repo.ignoregroups = ignoregroups
|
||||||
|
repo.enable()
|
||||||
self.repos.add(repo)
|
self.repos.add(repo)
|
||||||
repo.priority = 10 if lookaside else 20
|
repo.priority = 10 if lookaside else 20
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user