adapt to DNF 2.0 API changes

References: https://bugzilla.redhat.com/show_bug.cgi?id=1380566
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
Igor Gnatenko 2016-09-30 08:21:40 +02:00 committed by Brian C. Lane
parent 1cde1b46a4
commit ef5475e552
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ Requires: kpartx
Requires: libselinux-python3 Requires: libselinux-python3
Requires: python3-mako Requires: python3-mako
Requires: python3-kickstart Requires: python3-kickstart
Requires: python3-dnf >= 1.1.7 Requires: python3-dnf >= 2.0.0
%if 0%{?fedora} %if 0%{?fedora}

View File

@ -211,7 +211,7 @@ def get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None,
log.info("Skipping source repo: %s", r) log.info("Skipping source repo: %s", r)
continue continue
repo_name = "lorax-repo-%d" % i repo_name = "lorax-repo-%d" % i
repo = dnf.repo.Repo(repo_name, cachedir) repo = dnf.repo.Repo(repo_name, conf)
repo.baseurl = [r] repo.baseurl = [r]
if proxy: if proxy:
repo.proxy = proxy repo.proxy = proxy
@ -231,7 +231,7 @@ def get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None,
log.info("Skipping source repo: %s", r) log.info("Skipping source repo: %s", r)
continue continue
repo_name = "lorax-mirrorlist-%d" % i repo_name = "lorax-mirrorlist-%d" % i
repo = dnf.repo.Repo(repo_name, cachedir) repo = dnf.repo.Repo(repo_name, conf)
repo.mirrorlist = r repo.mirrorlist = r
if proxy: if proxy:
repo.proxy = proxy repo.proxy = proxy