[bitbake-devel] bb.utils.vercmp() not consistent with debian rules

Richard Purdie richard.purdie at linuxfoundation.org
Thu Apr 5 12:18:00 UTC 2012


On Thu, 2012-04-05 at 06:42 +0000, Lu, Lianhao wrote:
> Martin Jansa wrote on 2012-04-05:
> > On Thu, Apr 05, 2012 at 06:22:00AM +0000, Lu, Lianhao wrote:
> >> Hi guys,
> >> 
> >> When I'm looking at the Yocto bug#2233, I find that the function
> >> bb.utils.vercmp() is not consistent with the debian packaging
> >> rules(http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-
> >> Version).
> >> 
> >> According to debian rules, "r0" is earlier than "r0-dream", but the bb.utils.vercmp() thinks "r0" is later than "r0-dream".
> > 
> > And what about something like this:
> > 
> > Version: 3.2-r10
> > is older then
> > Version: 3.2-r2-oe0
> 
> I think this is exactly what the debian rules wants, "3.2-r10">"3.2-r2-oe0". And opkg follows that rule.
> 
> The problem is that bb.utils.vercmp thinks "3.2-r2">"3.2-r2-oe0" while opkg thinks "3.2-r2"<"3.2-r2-oe0".

All the version comparisons are meant to function the same way and the
debian sorting is meant to be used as a guide. If that patch does break
things, we should consider removing "-" as the separator and only use
".".

Cheers,

Richard





More information about the bitbake-devel mailing list