[Yum-devel] [PATCH] Match only current language instead of all in group/category searches.
Ville Skyttä
ville.skytta at iki.fi
Sat Oct 31 12:49:47 UTC 2009
---
yum/comps.py | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/yum/comps.py b/yum/comps.py
index 1e91b64..8d3e171 100755
--- a/yum/comps.py
+++ b/yum/comps.py
@@ -435,11 +435,10 @@ class Comps(object):
match = re.compile(fnmatch.translate(item), flags=re.I).match
for group in self.groups:
- names = [ group.name, group.groupid ]
- names.extend(group.translated_name.values())
- for name in names:
+ for name in group.name, group.groupid, group.ui_name:
if match(name):
returns[group.groupid] = group
+ break
return returns.values()
@@ -462,11 +461,10 @@ class Comps(object):
match = re.compile(fnmatch.translate(item), flags=re.I).match
for cat in self.categories:
- names = [ cat.name, cat.categoryid ]
- names.extend(cat.translated_name.values())
- for name in names:
+ for name in cat.name, cat.categoryid, cat.ui_name:
if match(name):
returns[cat.categoryid] = cat
+ break
return returns.values()
--
1.6.2.5
More information about the Yum-devel
mailing list