|
|
7c4f07 |
commit 2b617b86358aeedd3ed83fad0719cb0fada3241c
|
|
|
7c4f07 |
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
|
|
|
7c4f07 |
Date: Tue May 26 09:08:37 2015 +0200
|
|
|
7c4f07 |
|
|
|
7c4f07 |
yum-config-manager: update config file specified using -c option. BZ#1075708
|
|
|
7c4f07 |
|
|
|
7c4f07 |
diff --git a/README b/README
|
|
|
7c4f07 |
index 8abe805..0c01d0e 100644
|
|
|
7c4f07 |
--- a/README
|
|
|
7c4f07 |
+++ b/README
|
|
|
7c4f07 |
@@ -67,3 +67,5 @@ Author of the update on boot init scripts
|
|
|
7c4f07 |
- Tim Lauridsen
|
|
|
7c4f07 |
Maintainer of yum-utils - fixer of a lot of misc utils.
|
|
|
7c4f07 |
|
|
|
7c4f07 |
+- Valentina Mukhamedzhanova
|
|
|
7c4f07 |
+Maintainer of yum-utils.
|
|
|
7c4f07 |
diff --git a/yum-config-manager.py b/yum-config-manager.py
|
|
|
7c4f07 |
index 380a54f..708c33f 100755
|
|
|
7c4f07 |
--- a/yum-config-manager.py
|
|
|
7c4f07 |
+++ b/yum-config-manager.py
|
|
|
7c4f07 |
@@ -155,10 +155,13 @@ if (not args and not opts.addrepo) or 'main' in args:
|
|
|
7c4f07 |
print yb.fmtSection('main')
|
|
|
7c4f07 |
print yb.conf.dump()
|
|
|
7c4f07 |
if opts.save and hasattr(yb, 'main_setopts') and yb.main_setopts:
|
|
|
7c4f07 |
- fn = '/etc/yum/yum.conf'
|
|
|
7c4f07 |
+ fn = opts.conffile
|
|
|
7c4f07 |
if not os.path.exists(fn):
|
|
|
7c4f07 |
- # Try the old default
|
|
|
7c4f07 |
- fn = '/etc/yum.conf'
|
|
|
7c4f07 |
+ if fn == '/etc/yum/yum.conf':
|
|
|
7c4f07 |
+ # Try the old default
|
|
|
7c4f07 |
+ fn = '/etc/yum.conf'
|
|
|
7c4f07 |
+ else:
|
|
|
7c4f07 |
+ raise yum.Errors.ConfigError("Error accessing file for config %s" % fn)
|
|
|
7c4f07 |
ybc = yb.conf
|
|
|
7c4f07 |
writeRawConfigFile(fn, 'main', ybc.yumvar,
|
|
|
7c4f07 |
ybc.cfg.options, ybc.iteritems, ybc.optionobj,
|