RPM

Comment 26 for bug 633742

Revision history for this message
In , Jeff Johnson (n3npq) wrote :

One last related note is the EVRD parsing. This is the split
into a N-tuple (currently up to 4) and twiddle-in-version is
adding another element to the tuple with speshul comparison semantics.

The *RE parsing is quite general and can be used to split dependency
strings on newer boundaries, and can drop fields as well as permute
the precedence of the tuple comparisons, each of which is the (*rpmvercmp)
segmented string comparison applied sequentially to strings in the tuple.

Here is the configuration (from /usr/lib/rpm/macros) with the explicit
usage cases that match:

#==============================================================================
# ---- EVRD... dependency tuple comparison 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___ _23_ _2__
%evr_tuple_select 123_

# STEP 3: Configure the comparison order of the <E,V,R,D> tuple elements
%evr_tuple_order EVR

SO what is in RPM is quite general even if there isn't the conventionalized
and tightly administratively controlled narros usage of twiddle-in-version
as in Debian. I'm sure that whatever Poky wishes to do with RPM version
comparison can be accommodated.