[bitbake-devel] bitbake/utils: Convert vercmp_string() to use vercmp internally

Richard Purdie richard.purdie at linuxfoundation.org
Fri May 4 14:47:43 UTC 2012


On Fri, 2012-05-04 at 07:31 -0700, Chris Larson wrote:
> On Fri, May 4, 2012 at 7:03 AM, Richard Purdie
> <richard.purdie at linuxfoundation.org> wrote:
> > Having two different version comparision algorithms in bitbake has never seemed
> > like a sensible idea. Worryingly, they also return different results to each other.
> >
> > The vercmp_string API is relatively unused with no users in OE-Core or BitBake
> > itself for example. This patch converts it to use vercmp internalls, bringing
> > consitency to the comparisions which is easy now we have other recently added
> > functions. Yes, this changes behaviour but in this case I'd prefer we were
> > consistent than having two different comparisions.
> >
> > Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> 
> This seems sane to me (aside: minor typo: internalls). I recall that
> we attempted this once in the past with regular OE and got bitten hard
> by the actual users in the metadata, but clearly that's no longer a
> concern.

There are a couple of lib.oe.utils() functions that do call this api but
those themselves don't seem to be used anywhere I could spot.

The way I've changed things is API compatible, it just behaves
consistently with the other version functions and differently to how it
did before in some cases. I think last time we tried this, we tried to
remove it so this approach should be ok...

Cheers,

Richard





More information about the bitbake-devel mailing list