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

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