[oe] bitbake dependency question
Robert Cagle
rcagle at omnitron-systems.com
Tue Dec 13 04:47:31 UTC 2016
> Try something like:
> In recipeD.bb:
> PLUGIN_RECIPES ??= "A" (or b, c)
> DEPENDS = "${PLUGIN_RECIPES} other..."
> In local.conf:
> PLUGIN_RECIPES = "A" (or b, c).
Hi Robert,
Thanks for the response! My current solution is similar to what you suggest:
local.conf
PLUGIN_RECIPES = "recipeA recipeB recipeC"
recipeD.bb:
DEPENDS = "${PLUGIN_RECIPES} other"
I'm assuming the weak reference in 'PLUGIN_RECIPES ??= "A" (or b, c)' is to prevent errors if someone forgets to define PLUGIN_RECIPES in local.conf?
I was hoping to do something like this in an image recipe:
my-image.bb:
IMAGE_INSTALL_append = " recipeA recipeB recipeC recipeD"
and have the rest happen automatically based on the contents of those recipes.
However, maybe I could at least do:
my-image.bb:
IMAGE_INSTALL_append = " ${PLUGIN_RECIPES} recipeD other..."
and have everything controlled from local.conf by one variable. I'd rather have it the other way around (defined once in my-image.bb), but I can live with this. Thanks again!
-Bob
________________________________________
From: Robert Yang [liezhi.yang at windriver.com]
Sent: Monday, December 12, 2016 6:33 PM
To: openembedded-devel at lists.openembedded.org; Robert Cagle
Subject: Re: [oe] bitbake dependency question
Hi Robert
On 12/13/2016 10:10 AM, Robert Cagle wrote:
> I'm trying to figure out a reasonable way to specify dependencies on an unknown/virtual set of other recipes.
> For example,
>
> Recipe A: Plugin #1 (installs a plugin spec somewhere in /usr/share)
> Recipe B: Plugin #2 (same)
> Recipe C: Plugin #3 (same).
> Recipe D: Host Application (C based), which needs to be compiled last since it generates C code based on the spec files.
>
> I'd rather not hard-code dependencies in Recipe D since the specific set of plugins may be different depending on the specified distribution layer or machine type. I can define a variable in local.conf and use it to define D's dependencies, but that means I'll have to define the set twice: in the distribution layer and in local.conf. Based on what I've read and experimented with, this seems be my only choice (other than restructuring the application).
>
Try something like:
In recipeD.bb:
PLUGIN_RECIPES ??= "A" (or b, c)
DEPENDS = "${PLUGIN_RECIPES} other..."
In local.conf:
PLUGIN_RECIPES = "A" (or b, c).
// Robert
> I really just wanted to expand a variable in each of A,B,C
> PLUGIN_RECIPES += "${PN}"
>
> And have D declare
> DEPENDS = "${PLUGIN_RECIPES} other..."
>
> But that doesn't seem possible. Am I missing another way? (Python datastore maybe?)
>
> Thanks,
> Bob
>
More information about the Openembedded-devel
mailing list