[Yum-devel] [PATCH] Fix for https://bugzilla.redhat.com/show_bug.cgi?id=520810

Tim Lauridsen tim.lauridsen at googlemail.com
Thu Sep 3 07:17:23 UTC 2009


On 09/02/2009 07:44 PM, Seth Vidal wrote:
>
>
> On Wed, 2 Sep 2009, Ville Skyttä wrote:
>
>> On Wednesday 02 September 2009, Seth Vidal wrote:
>>> just b/c it looks like a glob doesn't mean it IS a glob:
>>> /usr/bin/[ is a legit file in coreutils but it looks (and acts)
>>> just like a glob - so we need to do an ='s search even if it looks
>>> like a glob. This makes me cranky.
>>
>> I'd argue that the presence of "[" alone in a string doesn't make it a
>> glob
>> candidate - it needs to be followed by a "]" for that. Ditto for "]"
>> without
>> a preceding "[". And there also needs to be something between them. So
>> maybe
>> this in re_glob() would be a better fix:
>>
>> - _re_compiled_glob_match = re.compile('.*[\*\?\[\]].*')
>> + _re_compiled_glob_match = re.compile('.*([*?]|\[.+\])')
>>
>> (while at it, dropped some unnecessary backslashes and trailing .*)
>
> That doesn't seem like a bad choice, no.
>
> thanks,
> -sv
>

Yes, i i much better :)

Tim


More information about the Yum-devel mailing list