Skip to content

Commit

Permalink
fix cachedir setup for dnf 0.5.3
Browse files Browse the repository at this point in the history
bump dnf dnf requirement
  • Loading branch information
Tim Lauridsen committed Jul 13, 2014
1 parent e4855de commit dbcc964
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dnfdaemon.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%global dnf_org org.baseurl.Dnf
%global dnf_version 0.5.2
%global dnf_version 0.5.3

Name: dnfdaemon
Version: 0.2.2
Expand Down
13 changes: 7 additions & 6 deletions python/dnfdaemon/server/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import dnf.exceptions
import dnf.callback
import dnf.comps
import dnf.rpm
import dnf.subject
import dnf.transaction
import dnf.yum
Expand Down Expand Up @@ -64,16 +65,16 @@ def packages(self):

def setup_cache(self):
"""Setup the dnf cache, same as dnf cli"""
# perform the CLI-specific cachedir tricks
conf = self.conf
conf.releasever = None # This will take the current release
# FIXME: This is not public API, but we want the same cache as dnf cli
suffix = dnf.yum.parser.varReplace(
dnf.const.CACHEDIR_SUFFIX, conf.yumvar)
conf = self.conf
releasever = dnf.rpm.detect_releasever('/')
conf.releasever = releasever
subst = conf.substitutions
suffix = dnf.yum.parser.varReplace(dnf.const.CACHEDIR_SUFFIX, subst)
cli_cache = dnf.conf.CliCache(conf.cachedir, suffix)
conf.cachedir = cli_cache.cachedir
self._system_cachedir = cli_cache.system_cachedir
logger.debug("dnf cachedir: %s" % conf.cachedir)
logger.debug("cachedir: %s", conf.cachedir)

def set_max_error(self, max_err):
"""Setup a new progress object with a new
Expand Down

0 comments on commit dbcc964

Please sign in to comment.