gather: handle metalink in kickstart repos
Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@qubes-os.org>
This commit is contained in:
parent
0ed70fc8b6
commit
9b101d554f
@ -52,7 +52,8 @@ class DnfWrapper(dnf.Base):
|
||||
self.arch_wrapper = ArchWrapper(self.conf.substitutions["arch"])
|
||||
self.comps_wrapper = CompsWrapper(self)
|
||||
|
||||
def add_repo(self, repoid, baseurl=None, enablegroups=True, lookaside=False):
|
||||
def add_repo(self, repoid, baseurl=None, enablegroups=True, lookaside=False,
|
||||
**kwargs):
|
||||
self.repos.add_new_repo(
|
||||
repoid,
|
||||
self.conf,
|
||||
@ -60,6 +61,7 @@ class DnfWrapper(dnf.Base):
|
||||
enabledgroups=enablegroups,
|
||||
priority=10 if lookaside else 20,
|
||||
module_hotfixes=True,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
||||
|
@ -114,14 +114,25 @@ def main(ns, persistdir, cachedir):
|
||||
# handling in hawkey
|
||||
if ks_repo.name not in gather_opts.lookaside_repos:
|
||||
continue
|
||||
dnf_obj.add_repo(
|
||||
ks_repo.name, ks_repo.baseurl, enablegroups=False
|
||||
)
|
||||
|
||||
if not ks_repo.metalink:
|
||||
dnf_obj.add_repo(
|
||||
ks_repo.name, ks_repo.baseurl, enablegroups=False
|
||||
)
|
||||
else:
|
||||
dnf_obj.add_repo(
|
||||
ks_repo.name, ks_repo.baseurl, enablegroups=False,
|
||||
metalink=ks_repo.metalink
|
||||
)
|
||||
|
||||
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)
|
||||
if not ks_repo.metalink:
|
||||
dnf_obj.add_repo(ks_repo.name, ks_repo.baseurl)
|
||||
else:
|
||||
dnf_obj.add_repo(ks_repo.name, ks_repo.baseurl,
|
||||
metalink=ks_repo.metalink)
|
||||
|
||||
with Profiler("DnfWrapper.fill_sack()"):
|
||||
dnf_obj.fill_sack(load_system_repo=False, load_available_repos=True)
|
||||
|
Loading…
Reference in New Issue
Block a user