I was looking over the rpmvercmp() code and noticed that:
rpmvercmp("1.", "1.a") -> -1
rpmvercmp("1.a", "1.") -> -1
because of the following two lines of code:
/* take care of the case where the two version segments are */
/* different types: one numeric and one alpha */
if (one == str1) return -1; /* arbitrary */
if (two == str2) return -1;
Perhaps the (two == str2) case should return 1 instead of -1. The comments
also seem off; the (one == str1) case occurs only when the first segment is
empty, for instance.
Added to rpm CVS. Thanks for noticing.