All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [OE-core] Layer priorities influencing default version selection
Date: Tue, 02 Aug 2011 14:45:35 +0100	[thread overview]
Message-ID: <1312292735.2344.597.camel@rex> (raw)
In-Reply-To: <201108021226.34560.paul.eggleton@linux.intel.com>

On Tue, 2011-08-02 at 12:26 +0100, Paul Eggleton wrote:
> Hi all,
> 
> Andrea pointed out a situation where he has seen the layer priority overriding 
> version selection, and I've been able to confirm it.
> 
> Basically, if you have a recipe with a lower version in a layer with a higher 
> priority it selects the lower version. What's more after digging further I 
> found there were some rather anomalous interactions with the version logic and 
> BBCLASSEXTEND. Here's an example using Poky:
> 
> 1. Firstly, copy meta/recipes-support/curl to meta-yocto/recipes-support, then 
> rename the version in meta-yocto so that its version is 7.20.0. At this point 
> both meta/ and meta-yocto/ have the same layer priority of 5.
> 
> 2.  "bitbake -s | grep ^curl" reports:
> curl                                               :7.21.7-r0                          
> curl-native                                        :7.21.7-r0                          
> curl-nativesdk                                     :7.21.7-r0                          
> 
> 3. Now increase the layer priority in meta-yocto/conf/layer.conf to 6, and run  
> "bitbake -s | grep ^curl" again:
> curl                                               :7.20.0-r0                          
> curl-native                                        :7.21.7-r0                          
> curl-nativesdk                                     :7.21.7-r0                          

This is clearly broken and needs to be consistent at the very least.

> So the latest version here is a lie, this is not the latest version available. 
> Furthermore it seems not to have affected the BBCLASSEXTENDs.
> 
> 4. Now add PREFERRED_VERSION_curl = "7.21.7" to conf/layer.conf and run 
> "bitbake -s | grep ^curl" again:
> curl                                 :7.20.0-r0                :7.21.7-r0
> curl-native                    :7.21.7-r0                          
> curl-nativesdk               :7.21.7-r0                          
> 
> So it can clearly see the other recipe, it just doesn't acknowledge it until 
> you force the matter.
> 
> This is all rather undesirable behaviour IMHO - even if the BBCLASSEXTEND and 
> reported "latest version available" issues were corrected, I think the policy 
> of "latest version wins unless DEFAULT_PREFERENCE or PREFERRED_VERSION says 
> otherwise" should not be affected by layer priority.
> 
> Thoughts?

We could do with clearly documenting this in the bitbake manual. I
suspect users would expect the highest version to win and we probably
should change the behaviour but I'm open to other opinions.

Cheers,

Richard





WARNING: multiple messages have this Message-ID (diff)
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: Layer priorities influencing default version selection
Date: Tue, 02 Aug 2011 14:45:35 +0100	[thread overview]
Message-ID: <1312292735.2344.597.camel@rex> (raw)
In-Reply-To: <201108021226.34560.paul.eggleton@linux.intel.com>

On Tue, 2011-08-02 at 12:26 +0100, Paul Eggleton wrote:
> Hi all,
> 
> Andrea pointed out a situation where he has seen the layer priority overriding 
> version selection, and I've been able to confirm it.
> 
> Basically, if you have a recipe with a lower version in a layer with a higher 
> priority it selects the lower version. What's more after digging further I 
> found there were some rather anomalous interactions with the version logic and 
> BBCLASSEXTEND. Here's an example using Poky:
> 
> 1. Firstly, copy meta/recipes-support/curl to meta-yocto/recipes-support, then 
> rename the version in meta-yocto so that its version is 7.20.0. At this point 
> both meta/ and meta-yocto/ have the same layer priority of 5.
> 
> 2.  "bitbake -s | grep ^curl" reports:
> curl                                               :7.21.7-r0                          
> curl-native                                        :7.21.7-r0                          
> curl-nativesdk                                     :7.21.7-r0                          
> 
> 3. Now increase the layer priority in meta-yocto/conf/layer.conf to 6, and run  
> "bitbake -s | grep ^curl" again:
> curl                                               :7.20.0-r0                          
> curl-native                                        :7.21.7-r0                          
> curl-nativesdk                                     :7.21.7-r0                          

This is clearly broken and needs to be consistent at the very least.

> So the latest version here is a lie, this is not the latest version available. 
> Furthermore it seems not to have affected the BBCLASSEXTENDs.
> 
> 4. Now add PREFERRED_VERSION_curl = "7.21.7" to conf/layer.conf and run 
> "bitbake -s | grep ^curl" again:
> curl                                 :7.20.0-r0                :7.21.7-r0
> curl-native                    :7.21.7-r0                          
> curl-nativesdk               :7.21.7-r0                          
> 
> So it can clearly see the other recipe, it just doesn't acknowledge it until 
> you force the matter.
> 
> This is all rather undesirable behaviour IMHO - even if the BBCLASSEXTEND and 
> reported "latest version available" issues were corrected, I think the policy 
> of "latest version wins unless DEFAULT_PREFERENCE or PREFERRED_VERSION says 
> otherwise" should not be affected by layer priority.
> 
> Thoughts?

We could do with clearly documenting this in the bitbake manual. I
suspect users would expect the highest version to win and we probably
should change the behaviour but I'm open to other opinions.

Cheers,

Richard





  reply	other threads:[~2011-08-02 13:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 11:26 Layer priorities influencing default version selection Paul Eggleton
2011-08-02 13:45 ` Richard Purdie [this message]
2011-08-02 13:45   ` Richard Purdie
2011-08-02 13:52   ` [OE-core] " Phil Blundell
2011-08-02 13:52     ` Phil Blundell
2011-08-02 14:14     ` [OE-core] " Chris Larson
2011-08-02 14:14       ` Chris Larson
2011-08-02 14:21       ` [OE-core] " Paul Eggleton
2011-08-02 14:21         ` [bitbake-devel] " Paul Eggleton
2011-08-02 14:27         ` [OE-core] " Chris Larson
2011-08-02 14:27           ` [bitbake-devel] " Chris Larson
2011-08-02 14:51           ` [OE-core] " Paul Eggleton
2011-08-02 14:51             ` [bitbake-devel] " Paul Eggleton
2011-08-02 14:55           ` [OE-core] " Mark Hatle
2011-08-02 15:35       ` Khem Raj
2011-08-02 15:35         ` [bitbake-devel] " Khem Raj
2011-08-25 10:50         ` [OE-core] " Paul Eggleton
2011-08-25 10:50           ` [bitbake-devel] " Paul Eggleton
2011-08-25 15:56           ` [OE-core] " Khem Raj
2011-08-25 15:56             ` [bitbake-devel] " Khem Raj
2011-08-25 16:58             ` [OE-core] " Paul Eggleton
2011-08-25 16:58               ` [bitbake-devel] " Paul Eggleton
2011-08-25 21:23               ` [OE-core] " Martin Jansa
2011-08-25 21:23                 ` [bitbake-devel] " Martin Jansa

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=1312292735.2344.597.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=openembedded-core@lists.openembedded.org \
    /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.