PREFERRED_VERSION_pn-: which version is selected?
Hi all.
I'm working with Krogoth on imx6
I have the same recipe with different versions
recipe1_0.9.bb
recipe1_1.0.bb
In the image recipe I put
image-recipe.bb
IMAGE_INSTALL_append := " \
recipe1 \
"
PREFERRED_VERSION_pn-recipe1 := "0.9"
If I do
bitbake -s
I get
recipe1 :1.0-r0
If I do
bitbake image-recipe
in image-recipe.manifest I look
recipe1 1.0-r0
Why is not selected the preferred version?
How can I choose the recipe's version I'd like?
Best regards,
MZ
Howdy!
Am Mo., 8. Feb. 2021 um 11:52 Uhr schrieb Mauro Ziliani <[email protected]>:
Quoted 9 lines
In the image recipe I put
image-recipe.bb
IMAGE_INSTALL_append := " \ recipe1 \"
PREFERRED_VERSION_pn-recipe1 := "0.9"
As usual, recipe data is local, conf data is global. Setting things that should affect other recipes (like PREFERRED_VERSION) does not work inside a recipe - and an image recipe is still just a recipe. This needs to go into the DISTRO config, usually.
Greetz
And the variable should be named PREFERRED_VERSION_recipe1 (it's not using pn as an override).
Quoted 24 lines · Josef Holzmayr
Howdy!
Am Mo., 8. Feb. 2021 um 11:52 Uhr schrieb Mauro Ziliani < [email protected]>:
Quoted 9 lines
In the image recipe I put
image-recipe.bb
IMAGE_INSTALL_append := " \ recipe1 \"
PREFERRED_VERSION_pn-recipe1 := "0.9"
As usual, recipe data is local, conf data is global. Setting things that should affect other recipes (like
PREFERRED_VERSION) does not work inside a recipe - and an image recipe is still just a recipe. This needs to go into the DISTRO config, usually.Greetz
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
How I can solve this?
Best regards
MZ
Il 08/02/21 12:09, Josef Holzmayr ha scritto:
Quoted 18 lines
Howdy!
Am Mo., 8. Feb. 2021 um 11:52 Uhr schrieb Mauro Ziliani <[email protected]>:
Quoted 9 lines
In the image recipe I put
image-recipe.bb
IMAGE_INSTALL_append := " \ recipe1 \"
PREFERRED_VERSION_pn-recipe1 := "0.9"
As usual, recipe data is local, conf data is global. Setting things that should affect other recipes (like
PREFERRED_VERSION) does not work inside a recipe - and an image recipe is still just a recipe. This needs to go into the DISTRO config, usually.Greetz
Hi Mauro,
Quoted 6 lines · Mauro Ziliani
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
Hi Mauro,
Quoted 17 lines · Mauro Ziliani
Hi all.
I'm working with Krogoth on imx6
I have the same recipe with different versions
recipe1_0.9.bb
recipe1_1.0.bb
In the image recipe I put
image-recipe.bb
Quoted 8 lines
IMAGE_INSTALL_append:= " \recipe1 \
"
PREFERRED_VERSION_pn-recipe1 := "0.9"
Yocto chant #1: Recipe data is local, conf data is global.
In other words, you cannot modify other recipes from one recipe.
Since image recipes are recipes, your PREFERRED_VERSION ni your image recipe is effectively a no-op.
On a side note, := operator is rarely seen outside of FILESEXTRAPATHS_prepend in bbappend, try to keep it this way.
Quoted 15 lines
If I do
bitbake -s
I get
recipe1 :1.0-r0
If I do
bitbake image-recipe
Quoted 9 lines
in image-recipe.manifest I look
recipe1 1.0-r0
Why is not selected the preferred version?
How can I choose the recipe's version I'd like?
In a configuration file: local.conf, distro.conf, machine.conf.
Though, it is heavily discouraged to use local.conf for anything except debugging sessions, as it is meant only for **local** configuration and isn't supposed to be versioned.
Cheers,
Quentin
Thanks all for suggestions ed corrections
MZ
Il 08/02/21 12:14, Quentin Schulz ha scritto:
Quoted 69 lines
Hi Mauro,
Quoted 17 lines · Mauro Ziliani
Hi all.
I'm working with Krogoth on imx6
I have the same recipe with different versions
recipe1_0.9.bb
recipe1_1.0.bb
In the image recipe I put
image-recipe.bb
Quoted 8 lines
IMAGE_INSTALL_append:= " \recipe1 \
"
PREFERRED_VERSION_pn-recipe1 := "0.9"
Yocto chant #1: Recipe data is local, conf data is global.
In other words, you cannot modify other recipes from one recipe.
Since image recipes are recipes, your
PREFERRED_VERSIONni your image recipe is effectively a no-op.On a side note, := operator is rarely seen outside of
FILESEXTRAPATHS_prependin bbappend, try to keep it this way.Quoted 14 lines
If I do
bitbake -s
I get
recipe1 :1.0-r0
If I do
bitbake image-recipe
Quoted 9 lines
in image-recipe.manifest I look
recipe1 1.0-r0
Why is not selected the preferred version?
How can I choose the recipe's version I'd like?
In a configuration file: local.conf, distro.conf, machine.conf.
Though, it is heavily discouraged to use local.conf for anything except debugging sessions, as it is meant only for **local** configuration and isn't supposed to be versioned.
Cheers,
Quentin