On Fri, Dec 28, 2007, Jeff Johnson wrote:
> [...]
> Well, Release: is definitely used in EVR comparison.
Yes, of course. I know.
> What you seem to want want is a change in the hierarchical precedence
> ordering of
> 1) Compare Epoch:
> 2) Compare Version:
> 3) Compare Release:
> from EVR to ERV or REV.
Yes, but just for a _SINGLE_ assertion in a dependency, please.
Not in general, I think. This would break too much, I can guess.
> It would not be hard to add, say
> %define version order REV
> and then rewrite the 1-2 places in rpm where the {Epoch, Version, Release}
> tuple is compared in order to make the hierarchical precedence
> configurable.
But this is then a global configuration. Sure, this _might_ be nice
to have. But it is risky as it might break too easy existing things.
I'm just seeking for a way to change this precedence for a single
dependency.
> An alternative approach will be needed for dpkg EVR comparison, where
> the collate sequence changes, rpm <-> dpkg dependencies have similar
> EVR comparison precedence. Plugging a different (*EVRcmp) vector is
> an alternative approach that could also do comparisons in ERV or REV
> ordering.
If there would be a way to just temporarily activate a different EVRcmp,
this would be sufficient.
>
> The really hard problem is mixed-mode:
> How does one compare two versions if one is EVR and the other is REV?
Sure, that's why one has to specify the order explicitly in a comparison
to make sure one doesn't mix anything. But for the particular comparison
both versions have to be brought in the same order, of course.
>> 2. What would be the best syntax?
>> (I think "N >= *-R" is very natural and "release(N) >= R" would be
>> also acceptable and is certainly what Jeff will recommend)
>
> There's a core representational problem that should be solved first.
> Dependencies all conform to the template
> E:V-R
> In order to split out the triple {E,V,R} there are heuristics such as
> E can only be digits, and that neither V nor R can contain '-'.
>
> Some modest thought can devise a means to serialize a {E,V,R}
> triple containing patterns and missing values and permitting '-' and
> E as a string and ... unambiguously.
>
> The really hard problem is proving that the change breaks nothing
> in all possible cases.
Yes, that's why I really seek for a solution which can be activated per
dependency check only. The "release(N) >= R" would be such a thing, I
think.
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Received on Fri Dec 28 15:27:25 2007