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.

Get rid of the mixture and you will get rid of the "too greedy".

Or is there something I'm not understanding?

73 de Jeff

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

Reply via email to