[Yum-devel] [PATCH] Don't show -c warning, when we've changed it due to --installroot. BZ 707358.

James Antill james at and.org
Thu Jun 23 17:28:38 UTC 2011


---
 cli.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/cli.py b/cli.py
index 82f286f..6056d38 100644
--- a/cli.py
+++ b/cli.py
@@ -264,7 +264,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
             opts.debuglevel = opts.errorlevel = 6
         if opts.debuglevel != pc.debuglevel or opts.errorlevel != pc.errorlevel:
             self.logger.warning("Ignored option -q, -v, -d or -e (probably due to merging: -yq != -y -q)")
-        if opts.conffile != pc.fn:
+        #  getRoot() changes it, but then setupYumConfig() changes it back. So
+        # don't test for this, if we are using --installroot.
+        if root == '/' and opts.conffile != pc.fn:
             self.logger.warning("Ignored option -c (probably due to merging -yc != -y -c)")
 
         if opts.version:
-- 
1.7.5.4



More information about the Yum-devel mailing list