pythonegg deps handling in rpm versions

Jeffrey Johnson n3npq at me.com
Mon Jan 28 07:52:14 CET 2013


On Jan 28, 2013, at 12:40 AM, Jakub Bogusz wrote:

> 
> It may be package/developer-specific.
> IIRC python itself used N.Ma -> N.Mb -> N.Mc -> N.M
> 

And RPM uses
	N.M -> N.M[abc]
so that Mandrake "N-V-Rmdk" is/was "newer" than Red Hat "N-V-R" packages,
artificially breaking ASCII ordering and not meetting anyone's (except Mandrake's)
expectations of RPM version comparison.

(aside)
There's a simple boolean in rpmdb/rpmevr.c:

/* XXX Force digits to beat alphas. See bugzilla #50977. */
/*@unchecked@*/
#if defined(RPM_VENDOR_MANDRIVA)  || defined(RPMVERCMP_DIGITS_BEAT_ALPHA) /* old-comparision-behaviour */
static int _invert_digits_alphas_comparison = -1;
#else
static int _invert_digits_alphas_comparison = 1;
#endif

that has been flipped in @rpm5.org code to partially restore ASCII ordering (where digits compare
as less than alpha's).

Flipping the bit isn't sufficient because digit and alpha strings are never directly compared:
digits are compared with digits, alphas with alphas, in a segmented string comparison.

When digits SHOULD naturally be compared to alphas, they are actually compared to NUL (i.e. '\0').

Changing this behavior in RPM is quite difficult since instant incompatibilities will be introduced.

So the "best" (i.e. minimum necessary change) answer for RPM to accommodate expectations
of Python eggs versioning is to attempt a transform (like adding "0." prefix) to ensure that RPM
and Python eggs compare versions identically.

hth

73 de Jeff



> 
> -- 
> Jakub Bogusz    http://qboosh.pl/
> _______________________________________________
> pld-devel-en mailing list
> pld-devel-en at lists.pld-linux.org
> http://lists.pld-linux.org/mailman/listinfo/pld-devel-en



More information about the pld-devel-en mailing list