RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Implementing EVR comparisons using *RE's ?

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 07 May 2009 - 15:37:23 CEST
Message-id: <671DA9A4-BF81-4AA9-A8E1-039ECFB6D458@mac.com>

On May 7, 2009, at 9:12 AM, Mark Hatle wrote:

> While I don't have an answer for you, my concern with any change to  
> rpmvercmp is around compatibility.. bugs become features....
>

No change to rpmvercmp was suggested implied or anything else.

I asked a theoretical question, nothing more.

> What I've never seen well documented is the actual algorithm that  
> rpmvercmp uses for it's comparison (in a human readable form).  I  
> attempted to write one once and I can dig it up if it will help...  
> but I'm not even 100% sure it's really correct.
>

I've suggested __REPEATEDLY__, most recently as comments on the
"LSB package" standard, that versioning is important.

Noone cares, no interest. *shrug*

> As for using RE, it should be possible to simplify the rpmvercmp and  
> do it for same pattern upgrades, but when the pattern changes thats  
> where we would need to fall back to rpmvercmp rules.  (note, I think  
> it's important someone document the deb vercmp as well..  I know we  
> had a discussion on this a few years back and they were ALMOST the  
> same, but not exactly...)
>

Again, rpmvercmp is not changing. I asked how close *RE's could
come to approximating rpmvercmp, nothing more.

FWIW, rpmvercmp is pluggable in RPM. It ceased to matter
what rpmvercmp does several years ago. RPM uses what is
plugged everywhere. The blug has 2 string gozzintas, and
the usual {-1,0,1} comesouta. Otherwise a black box.

73 de Jeff

> --Mark
>
> Jeff Johnson wrote:
>> While muddling through how to add rpmvercmp to JavaScript,
>> I find myself thinking Yet Again about how silly and feeble
>> and fragile and deficient rpmvercmp actually is.
>> So I ask the question:
>>    Can *RE patterns that match newer but not older
>>    packages be devised?
>> The general answer is boring: No, of course not.
>> But %track (and /usr/lib/rpm/vcheck.pl) are based
>> on *RE's and Get It Right! (i.e. detecting newer
>> upstream versions of tarballs) sufficiently often
>> that newer EVR comnparisons might be done with *RE's
>> rather than the usual slice-n-dice of alpha/digit/other
>> character sets and using strcmp(3).
>> Perhaps a better (as in easier to answer) question is
>>    How many types of versioning pattern templates would
>>    need to recognized for rpmvercmp to be done
>>    using *RE's instead?
>> 73 de Jeff
>> ______________________________________________________________________
>> RPM Package Manager                                    http:// 
>> rpm5.org
>> Developer Communication List                        rpm- 
>> devel@rpm5.org
>
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> Developer Communication List                        rpm-devel@rpm5.org
Received on Thu May 7 15:38:27 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.