[Yum-devel] [PATCH] Match only current language instead of all in group/category searches.
Seth Vidal
skvidal at fedoraproject.org
Sat Oct 31 14:28:01 UTC 2009
On Sat, 31 Oct 2009, Ville Skyttä wrote:
> ---
> 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()
nack - I'm pretty certain we're matching all langs intentionally.
-sv
More information about the Yum-devel
mailing list