[Yum-devel] [PATCH 2/3] Treat square brackets same way in re_full_search_needed and refineSearchPattern as in re_glob.

Ville Skyttä ville.skytta at iki.fi
Wed Oct 28 19:36:42 UTC 2009

On Wednesday 28 October 2009, Ville Skyttä wrote:

> @@ -115,7 +115,7 @@ def re_full_search_needed(s):
> -        one   = re.compile('.*[-.*?[\]].*.$')
> +        one   = re.compile('.*([-.*?]|\[.+\]).*.$')

About this one: what's the intention of the ".*.$" at the end?  It's unrelated 
to this patch which just preserves what existed before it wrt this, but I'm 
not sure I understand it.  If the intention is that full search should be 
triggered if we see - or . or a glob construct but ONLY when followed by 
something (disregarding epoch stuff which is handled by the other nearby 
regex), I think the ".*.$" could be replaced by just "." and it'd make the 
intention clearer.

More information about the Yum-devel mailing list