All of lore.kernel.org
 help / color / mirror / Atom feed
* in what recipe context can "bb" show me TOOLCHAIN_HOST_TASK?
@ 2016-10-22  7:39 Robert P. J. Day
  2016-10-22 11:08 ` Ulf Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2016-10-22  7:39 UTC (permalink / raw)
  To: OE Core mailing list


  a question about chris larson's nifty "bb" utility ... i recently
figured out that, to get rpm-build into the SDK, i needed to add:

TOOLCHAIN_HOST_TASK += "nativesdk-rpm-build"

to my local.conf. now i'd like to use "bb" to display the full
value of that variable, but i'm not sure what recipe context to use to
do that. as in:

$ bb show -r core-image-minimal TOOLCHAIN_HOST_TASK
Parsing recipes..done.
TOOLCHAIN_HOST_TASK=" nativesdk-rpm-build"
$

that just shows me what i appended. in what environment or recipe
context could i run that command to get the full value of the variable
when the SDK is being built?

rday

p.s. same question if i was using "bitbake -e".

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: in what recipe context can "bb" show me TOOLCHAIN_HOST_TASK?
  2016-10-22  7:39 in what recipe context can "bb" show me TOOLCHAIN_HOST_TASK? Robert P. J. Day
@ 2016-10-22 11:08 ` Ulf Magnusson
  2016-10-22 11:50   ` Robert P. J. Day
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Magnusson @ 2016-10-22 11:08 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

Hello,

On Sat, Oct 22, 2016 at 9:39 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
>   a question about chris larson's nifty "bb" utility ... i recently
> figured out that, to get rpm-build into the SDK, i needed to add:
>
> TOOLCHAIN_HOST_TASK += "nativesdk-rpm-build"
>
> to my local.conf. now i'd like to use "bb" to display the full
> value of that variable, but i'm not sure what recipe context to use to
> do that. as in:
>
> $ bb show -r core-image-minimal TOOLCHAIN_HOST_TASK
> Parsing recipes..done.
> TOOLCHAIN_HOST_TASK=" nativesdk-rpm-build"
> $
>
> that just shows me what i appended. in what environment or recipe
> context could i run that command to get the full value of the variable
> when the SDK is being built?
>
> rday
>
> p.s. same question if i was using "bitbake -e".

You're seeing the final value of TOOLCHAIN_HOST_TASK (before any
changes to it within a single task anyway). To extend the default
value instead of replacing it, you would need to do the following
(note the space after the "):

  TOOLCHAIN_HOST_TASK_append = " nativesdk-rpm-build"

Below is an explanation of why this works:

Image recipes like core-image-minimal (indirectly) inherit
meta/classes/populate_sdk_base.bbclass, which sets the default value
of TOOLCHAIN_HOST_TASK as follows:

  TOOLCHAIN_HOST_TASK ?= "nativesdk-packagegroup-sdk-host
packagegroup-cross-canadian-${MACHINE}"

Since the global configuration from .conf files like local.conf is
parsed before recipes (and the classes they inherit), using += means
that TOOLCHAIN_HOST_TASK will already have a value by the time the ?=
assignment is encountered, skipping the assignment. With _append, the
appending is delayed until the end of parsing, and the ?= assignment
won't be skipped.

I've submitted many changes to the 2.2 manuals that deal with
conceptual understanding by the way. If you're still reading the 2.1
manuals or earlier, you might want to switch.

 * To understand how variable "scopes" work in Yocto, see the note in
http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-debugging-viewing-variable-values.

 * To understand the motivation behind _append/_prepend/_remove, see
https://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#override-style-operation-advantages.

 * One of the notes in
http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-debugging-others
includes a recursive search helper that might be handy.

 * Should be documented in the manuals, but currently isn't: To see
which recipes inherit a particular class (either directly or
indirectly), you can use a command like the following one:

     $ bitbake-layers show-recipes -i populate_sdk_base

The TOOLCHAIN_HOST_TASK and TOOLCHAIN_TARGET_TASK variables could use
some more documentation. Submitting documentation suggestions to
https://bugzilla.yoctoproject.org/enter_bug.cgi?classification=Documentation
for stuff that's unnecessarily cryptic is highly appreciated.

Cheers,
Ulf


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: in what recipe context can "bb" show me TOOLCHAIN_HOST_TASK?
  2016-10-22 11:08 ` Ulf Magnusson
@ 2016-10-22 11:50   ` Robert P. J. Day
  0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2016-10-22 11:50 UTC (permalink / raw)
  To: Ulf Magnusson; +Cc: OE Core mailing list

On Sat, 22 Oct 2016, Ulf Magnusson wrote:

> Hello,
>
> On Sat, Oct 22, 2016 at 9:39 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >
> >   a question about chris larson's nifty "bb" utility ... i recently
> > figured out that, to get rpm-build into the SDK, i needed to add:
> >
> > TOOLCHAIN_HOST_TASK += "nativesdk-rpm-build"
> >
> > to my local.conf. now i'd like to use "bb" to display the full
> > value of that variable, but i'm not sure what recipe context to use to
> > do that. as in:
> >
> > $ bb show -r core-image-minimal TOOLCHAIN_HOST_TASK
> > Parsing recipes..done.
> > TOOLCHAIN_HOST_TASK=" nativesdk-rpm-build"
> > $
> >
> > that just shows me what i appended. in what environment or recipe
> > context could i run that command to get the full value of the variable
> > when the SDK is being built?
> >
> > rday
> >
> > p.s. same question if i was using "bitbake -e".
>
> You're seeing the final value of TOOLCHAIN_HOST_TASK (before any
> changes to it within a single task anyway). To extend the default
> value instead of replacing it, you would need to do the following
> (note the space after the "):
>
>   TOOLCHAIN_HOST_TASK_append = " nativesdk-rpm-build"
>
> Below is an explanation of why this works:

  actually, i just noticed that a few minutes ago. i'm well aware of
the difference in processing between += and _append, it just didn't
occur to me to see if there was a difference at the time. duh.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-22 11:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-22  7:39 in what recipe context can "bb" show me TOOLCHAIN_HOST_TASK? Robert P. J. Day
2016-10-22 11:08 ` Ulf Magnusson
2016-10-22 11:50   ` Robert P. J. Day

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.