RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Generalizing EVR comparison precedence, preliminaries

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 01 Jan 2009 - 19:28:43 CET
Message-id: <44ACF2F2-784D-4A6C-9FF8-CC7F79A12302@mac.com>

On Jan 1, 2009, at 1:04 PM, Ralf S. Engelschall wrote:
>
> I propose the following three entries in "macros"...
>
>    # STEP 1: Match the string and capture regex parts
>    #                      1          2           3             4
>    #                      X     ":"  X        "-"X          ":"X
>    %evr_tuple_match  ^(?:([^:-]+):)?([^:-]+)(?:-([^:-]+))?(?::([^:-] 
> +))?$
>
>    # 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 1234     123_     12__     1___     _12_     __2_
>
>    # STEP 3: Configure the comparison order of the <E,V,R,D> tuple  
> elements
>    %evr_tuple_order  EVRD
>
> ...plus the corresponding C code which takes "%evr_tuple_match",
> compiles it, matches it against the string, uses the  
> "%evr_tuple_select"
> alternatives (first one which results in no undefined captured regex
> parts wins and stop the tuple selection) to create the tuple and then
> "%evr_tuple_order" is used to configure the order on how the tuple
> elements are compared.
>

WORKSFORME, poifect, thanks!

BTW, attaching "arbitrary syntax" to arbitrary tags needs doing with an
(optional) RE pattern too.

No hurry ... ;-)

73 de Jeff

  • application/pkcs7-signature attachment: smime.p7s
Received on Thu Jan 1 19:28:47 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.