* How to combine BBCLASSEXTEND and variable export
@ 2013-09-25 15:39 Hans Beckérus
2013-09-26 10:13 ` Paul Eggleton
0 siblings, 1 reply; 5+ messages in thread
From: Hans Beckérus @ 2013-09-25 15:39 UTC (permalink / raw)
To: yocto@yoctoproject.org
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?
Thanks.
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to combine BBCLASSEXTEND and variable export
2013-09-25 15:39 How to combine BBCLASSEXTEND and variable export Hans Beckérus
@ 2013-09-26 10:13 ` Paul Eggleton
2013-09-26 10:38 ` Hans Beckérus
0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2013-09-26 10:13 UTC (permalink / raw)
To: Hans Beckérus; +Cc: yocto
Hi Hans,
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
}
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to combine BBCLASSEXTEND and variable export
2013-09-26 10:13 ` Paul Eggleton
@ 2013-09-26 10:38 ` Hans Beckérus
2013-09-26 10:48 ` Paul Eggleton
0 siblings, 1 reply; 5+ messages in thread
From: Hans Beckérus @ 2013-09-26 10:38 UTC (permalink / raw)
To: Paul Eggleton; +Cc: yocto@yoctoproject.org
On Thu, Sep 26, 2013 at 12:13 PM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> Hi Hans,
>
> 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?
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to combine BBCLASSEXTEND and variable export
2013-09-26 10:38 ` Hans Beckérus
@ 2013-09-26 10:48 ` Paul Eggleton
2013-09-26 14:32 ` Hans Beckérus
0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2013-09-26 10:48 UTC (permalink / raw)
To: Hans Beckérus; +Cc: yocto@yoctoproject.org
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@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.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to combine BBCLASSEXTEND and variable export
2013-09-26 10:48 ` Paul Eggleton
@ 2013-09-26 14:32 ` Hans Beckérus
0 siblings, 0 replies; 5+ messages in thread
From: Hans Beckérus @ 2013-09-26 14:32 UTC (permalink / raw)
To: Paul Eggleton; +Cc: yocto@yoctoproject.org
On Thu, Sep 26, 2013 at 12:48 PM, Paul Eggleton
<paul.eggleton@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@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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-09-26 14:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-25 15:39 How to combine BBCLASSEXTEND and variable export Hans Beckérus
2013-09-26 10:13 ` Paul Eggleton
2013-09-26 10:38 ` Hans Beckérus
2013-09-26 10:48 ` Paul Eggleton
2013-09-26 14:32 ` Hans Beckérus
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.