[yocto] How to combine BBCLASSEXTEND and variable export

Hans Beckérus hans.beckerus at gmail.com
Thu Sep 26 07:32:00 PDT 2013


On Thu, Sep 26, 2013 at 12:48 PM, Paul Eggleton
<paul.eggleton at linux.intel.com> wrote:
> On Thursday 26 September 2013 12:38:13 Hans Beckérus wrote:
>> On Thu, Sep 26, 2013 at 12:13 PM, Paul Eggleton
>> <paul.eggleton at linux.intel.com> wrote:
>> > On Wednesday 25 September 2013 17:39:04 Hans Beckérus wrote:
>> >> Hi. I have a recipe that use BBCLASSEXTEND to extend native. For the
>> >> normal/base version I wish to set/export an environment variable to be
>> >> picked up by configure.
>> >> But I do not wish this variable to be set by the native package. How
>> >> would I accomplish that? It was ok before when I had a package-native
>> >> recipe but since that is obsolete in favor for BBCLASSEXTEND I wish to
>> >> remove it. I think I covered all the other caveats like DEPEND and
>> >> PACKAGE/FILES. But this one is not as straight forward, or is it?
>> >
>> > If I'm understanding the requirements correctly think you could do
>> > something like:
>> >
>> > do_configure_prepend_class_target() {
>> >
>> >         export VARIABLE=value
>> >
>> > }
>>
>> Yes, I believe I tried that, but then the export does not persist over
>> do_configure(), does it?
>> It is only alive during the scope of do_configure_prepend() or?
>
> The _prepend is just prepended to the function before running it, so it will
> be applied for the entire function. If you have a look at
> temp/run.do_configure.* in the workdir for the recipe, you'll be able to verify
> this.
>
Ah, yes. Of course it works like that. What was I thinking :)
Thanks for the help Paul. I must have done some mistake before which
made it go wrong.

> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre



More information about the yocto mailing list