On Jan 25, 2011, at 12:17 AM, Per Øyvind Karlsen wrote:

> grf, sent this one earlier with wrong alias..
> 2011/1/25 Per Øyvind Karlsen <peroyv...@mandriva.org>:
>> 2011/1/24 Jeff Johnson <n3...@mac.com>:
>>> Lessess if we can get this "fixed".
>>> 
>>> On Jan 19, 2011, at 8:39 PM, Per Øyvind Karlsen wrote:
>>>>> 
>>>>>> To make dbiFindMatches() to match -%{disttag}%{distepoch}, I changed
>>>>>> _post_NVRA to:
>>>>>> 
>>>>>> static const char _post_NVRA[] =
>>>>>> "(-[^-]+-[^-]+-[^-]+\\.[^.]+|-[^-]+-[^-]+\\.[^.]+|-[^-]+\\.[^.]+|\\.[^.]+|)$";
>>>>>> 
>>>>>> This expression gets too greedy for packages with '-' in the name and
>>>>>> without disttag/distepoch though..
>>>>>> 
>>>>> 
>>> 
>>> There is something I don't understand here.
>>> 
>>> Let's say a NVRA key looks like this
>>> 
>>>        foo-1.2-3mdv2011.0.noarch
>>> 
>>> That might be a {N,V,R,A} 4-tuple, or that might be a {N,V,R,D,A} 5- or 
>>> 6-tuple.
>>> 
>>> Either way the string is identical, and the existing _post_NVRA pattern
>>> either "works" or doesn't.
>>> 
>>> So where is this "too greedy" coming from? My guess is that you have
>>> mixtures of strings in the NVRA index, some with "mdv2011.0", some without.
>> Yupp, that's just it.

No, there's _STILL_ something I'm missing.

Concatenated strings -- with or without Distepoch: --
will "work" without any change.

Can you supply an example where the existing implementation
is "too greedy" for some input pattern applied to some set of strings?

73 de Jeff



______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to