Blame SOURCES/BZ-1129590-setopt-wildcards-save.patch

74e468
diff -up yum-utils-1.1.31/yum-config-manager.py.old yum-utils-1.1.31/yum-config-manager.py
74e468
--- yum-utils-1.1.31/yum-config-manager.py.old	2014-08-13 11:50:30.000000000 +0200
74e468
+++ yum-utils-1.1.31/yum-config-manager.py	2014-08-13 11:52:02.801755611 +0200
74e468
@@ -7,6 +7,7 @@ import yum
74e468
 sys.path.insert(0,'/usr/share/yum-cli')
74e468
 from utils import YumUtilBase
74e468
 import logging
74e468
+import fnmatch
74e468
 
74e468
 from iniparse import INIConfig
74e468
 
74e468
@@ -97,6 +98,11 @@ def writeRawConfigFile(filename, section
74e468
     fp.write(str(ini))
74e468
     fp.close()
74e468
 
74e468
+def match_repoid(repoid, repo_setopts):
74e468
+    for i in repo_setopts:
74e468
+        if fnmatch.fnmatch(repoid, i):
74e468
+            return True
74e468
+
74e468
 NAME = 'yum-config-manager'
74e468
 VERSION = '1.0'
74e468
 USAGE = '"yum-config-manager [options] [section]'
74e468
@@ -175,7 +181,7 @@ if not opts.addrepo:
74e468
             repo.disable()
74e468
         print repo.dump()
74e468
         if (opts.save and
74e468
-            (only or (hasattr(yb, 'repo_setopts') and repo.id in yb.repo_setopts))):
74e468
+            (only or (hasattr(yb, 'repo_setopts') and match_repoid(repo.id, yb.repo_setopts)))):
74e468
             writeRawConfigFile(repo.repofile, repo.id, repo.yumvar,
74e468
                                repo.cfg.options, repo.iteritems, repo.optionobj,
74e468
                                only)