[f20/master] DNFPayload: tweak to the API changes in dnf-0.4.8
Ales Kozumplik
akozumpl at redhat.com
Fri Nov 22 14:38:43 UTC 2013
From: Ales Kozumplik <ales at redhat.com>
---
anaconda.spec.in | 2 +-
pyanaconda/packaging/dnfpayload.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 2e8afde..9a46b0c 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -80,7 +80,7 @@ BuildRequires: s390utils-devel
%endif
Requires: anaconda-widgets = %{version}-%{release}
-Requires: dnf >= 0.4.7
+Requires: dnf >= 0.4.8
Requires: python-blivet >= 0.23.5
Requires: gnome-icon-theme-symbolic
Requires: python-meh >= %{mehver}
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
index 9de7ceb..c62e643 100644
--- a/pyanaconda/packaging/dnfpayload.py
+++ b/pyanaconda/packaging/dnfpayload.py
@@ -39,6 +39,7 @@ log = logging.getLogger("packaging")
try:
import dnf
import dnf.exceptions
+ import dnf.repo
import dnf.output
import rpm
except ImportError as e:
@@ -100,7 +101,7 @@ class DNFPayload(packaging.PackagePayload):
self._configure()
def _add_repo(self, ksrepo):
- repo = self._base.build_repo(ksrepo.name)
+ repo = dnf.repo.Repo(ksrepo.name, DNF_CACHE_DIR)
url = ksrepo.baseurl
mirrorlist = ksrepo.mirrorlist
if url:
@@ -145,8 +146,7 @@ class DNFPayload(packaging.PackagePayload):
def _configure(self):
self._base = dnf.Base()
conf = self._base.conf
- self._base.cache_c.prefix = DNF_CACHE_DIR
- self._base.cache_c.suffix = 'default'
+ conf.cachedir = DNF_CACHE_DIR
conf.logdir = '/tmp/payload-logs'
# disable console output completely:
conf.debuglevel = 0
--
1.8.3.1
More information about the anaconda-patches
mailing list