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

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