From ef5475e552515107dd012de328640f07e6dcf4f1 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 30 Sep 2016 08:21:40 +0200 Subject: [PATCH] adapt to DNF 2.0 API changes References: https://bugzilla.redhat.com/show_bug.cgi?id=1380566 Signed-off-by: Igor Gnatenko --- lorax.spec | 2 +- src/sbin/lorax | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lorax.spec b/lorax.spec index 39c4ae0e..6a5b4215 100644 --- a/lorax.spec +++ b/lorax.spec @@ -46,7 +46,7 @@ Requires: kpartx Requires: libselinux-python3 Requires: python3-mako Requires: python3-kickstart -Requires: python3-dnf >= 1.1.7 +Requires: python3-dnf >= 2.0.0 %if 0%{?fedora} diff --git a/src/sbin/lorax b/src/sbin/lorax index df4994d3..5e998129 100755 --- a/src/sbin/lorax +++ b/src/sbin/lorax @@ -211,7 +211,7 @@ def get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None, log.info("Skipping source repo: %s", r) continue repo_name = "lorax-repo-%d" % i - repo = dnf.repo.Repo(repo_name, cachedir) + repo = dnf.repo.Repo(repo_name, conf) repo.baseurl = [r] if 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) continue repo_name = "lorax-mirrorlist-%d" % i - repo = dnf.repo.Repo(repo_name, cachedir) + repo = dnf.repo.Repo(repo_name, conf) repo.mirrorlist = r if proxy: repo.proxy = proxy