All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Lu, Lianhao" <lianhao.lu@intel.com>
Cc: "'bitbake-devel@lists.openembedded.org'"
	<bitbake-devel@lists.openembedded.org>,
	Martin Jansa <martin.jansa@gmail.com>
Subject: Re: bb.utils.vercmp() not consistent with debian rules
Date: Thu, 05 Apr 2012 13:59:31 +0100	[thread overview]
Message-ID: <1333630771.6300.12.camel@ted> (raw)
In-Reply-To: <1333628280.6300.6.camel@ted>

On Thu, 2012-04-05 at 13:18 +0100, Richard Purdie wrote:
> 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
> ".".

So just to be clear, we have various version sorting algorithms:

* opkg
* opkg-compare-versions (which has a C version and a shell version!)
* bb.utils.vercmp()
* bb.utils.vercmp_string()

and all these functions *need* to be consistent. Consistent is defined
in this case as following the Debian version policy. This is ignoring
the other package backends. dpkg should "just work", rpm can be
programmed to use any algorithm and is probably not consistent with this
at this point but we should probably ignore that in the equation at this
point.

So the question is, which of the above are consistent or inconsistent
with each other (and dpkg), and how they are inconsistent. We can then
consider what to do about it.

Cheers,

Richard




  reply	other threads:[~2012-04-05 13:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-05  6:22 bb.utils.vercmp() not consistent with debian rules Lu, Lianhao
2012-04-05  6:28 ` Martin Jansa
2012-04-05  6:42   ` Lu, Lianhao
2012-04-05 12:18     ` Richard Purdie
2012-04-05 12:59       ` Richard Purdie [this message]
2012-04-05 14:44         ` Lu, Lianhao
2012-04-06  3:00           ` Lu, Lianhao
2012-04-06 16:56     ` Mark Hatle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1333630771.6300.12.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=lianhao.lu@intel.com \
    --cc=martin.jansa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.