richardphibel / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

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

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