richardphibel / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

Blame SOURCES/0010-Fix-priority-cachedir-priority-with---cacheonly.patch

919af6
From 5e8a1723a7c93f7f2a564d12a62b52d00d33c446 Mon Sep 17 00:00:00 2001
919af6
From: Jaroslav Mracek <jmracek@redhat.com>
919af6
Date: Tue, 30 Oct 2018 12:53:07 +0100
919af6
Subject: [PATCH] Fix priority cachedir priority with --cacheonly
919af6
919af6
---
919af6
 dnf/cli/cli.py | 3 ++-
919af6
 1 file changed, 2 insertions(+), 1 deletion(-)
919af6
919af6
diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
919af6
index ff7d80d..17a31fc 100644
919af6
--- a/dnf/cli/cli.py
919af6
+++ b/dnf/cli/cli.py
919af6
@@ -811,7 +811,8 @@ class Cli(object):
919af6
         # Read up configuration options and initialize plugins
919af6
         try:
919af6
             if opts.cacheonly:
919af6
-                self.base.conf.cachedir = self.base.conf.system_cachedir
919af6
+                opt = self.base.conf._get_option("cachedir")
919af6
+                opt._set(self.base.conf.system_cachedir, dnf.conf.PRIO_COMMANDLINE)
919af6
                 self.demands.cacheonly = True
919af6
             self.base.conf._configure_from_options(opts)
919af6
             self._read_conf_file(opts.releasever)
919af6
--
919af6
libgit2 0.26.7
919af6