RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Generalizing EVR comparison precedence, preliminaries

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 02 Jan 2009 - 18:42:31 CET
Message-id: <40C67047-4237-4ACB-87FC-9BB97B12D4A5@mac.com>

On Jan 2, 2009, at 4:46 AM, Ralf S. Engelschall wrote:
>
>    # STEP 2: Assemble <E,V,R,D> tuple from regex parts
>    # <E,V,R,D>       case 1:  case 2:  case 3:  case 4:  case 5:   
> case 6:
>    #                 X:X-X:X  X:X-X    X:X      X:       X-X      X
>    %evr_tuple_select 2357     237_     23__     2___     _23_     __5_
>

This macro determines the mapping from sub-patterns to the tuple  
{E,V,R,D}.

The scatter/gather operation in the mapping is necessary for more  
general
support than what is currently implemented, where E=1, V=2, R=3, D=4 is
assumed.

But perhaps an alternative syntax, using the implicit position to hide
the sub-pattern index, and having an explicit (and opaque, there's  
nothing
particularly holy about "E", "V", "R", and "D" tokens as long as the
same characters appear in the %evr_tuple_order precedence permutation)
single character identifier for a sub-pattern match.

Here's an explicit example, permutations, like daylight savings time,
is difficult to discuss unambiguously (implicit positional example based
on 1 rather than 0 as first index):

    # STEP 2: Assemble <E,V,R,D> tuple from regex parts
    # <E,V,R,D>       case 1:  case 2:  case 3:   case 4:  case 5:   
case 6:
    #                 X:X-X:X  X:X-X    X:X       X:       X-X      X
    %evr_tuple_select _EV_R_D  _EV___R  _EV_____  _E_____  __VR___   
__V____

Hmmm, case 5 "_23_" might be incorrect, I would have naively expected  
"E" in position 2.
Not looked (you likely have), will check and correct.

There's also a (possible) ambiguity in case 3 "X:X" or a missing case  
7 candidate as "X::X". yawn ...

I personally don't care much; either implementation is straightforward  
and one
of the configuration syntaxes needs to be done.

Opinions?

73 de Jeff




  • application/pkcs7-signature attachment: smime.p7s
Received on Fri Jan 2 18:42:37 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.