Re: PREFERRED_VERSION_pn-: which version is selected?


Quentin Schulz
 

Hi Mauro,

On Mon, Feb 08, 2021 at 05:23:36PM +0100, Mauro Ziliani wrote:
My purpose is this.

For image-recipe_1.0.0 I need recip1 version 0.9

For image-recipe_1.1.0 I need recip1 version 1.0
You can't. Because recipes cannot impact other recipes.

Now there's a catch, which applies to a VERY specific corner case.

Let's say recip1 is a final package (recip1 recipe is in no DEPENDS of any
recipe, recip1 recipe packages are in no RDEPENDS, only recip1 packages are
mentioned in image recipes).

You can rename recip1_0.9 to recip109_0.9.bb and in your
image-recipe_1.0.0 add recip109 to IMAGE_INSTALL.
in image-recipe_1.1.0 have recip1 in IMAGE_INSTALL.

Obviously, since the recipe name is now different, they are different
recipes to Yocto, which means DEPENDS and RDEPENDS won't be
automatically "updated" to get the version you selected in image-recipe
(because... recipes can't modify other recipes).

Cheers,
Quentin

Join yocto@lists.yoctoproject.org to automatically receive all group messages.