diff --git a/bitbake/doc/user-manual/user-manual-metadata.xml b/bitbake/doc/user-manual/user-manual-metadata.xml
index 6ee8971562..5e4551bb6b 100644
--- a/bitbake/doc/user-manual/user-manual-metadata.xml
+++ b/bitbake/doc/user-manual/user-manual-metadata.xml
@@ -34,7 +34,7 @@
VARIABLE = "value"
- In this example, VARIABLE is value.
+ In this example, VARIABLE is value.
@@ -52,9 +52,9 @@
A = "aval"
B = "pre${A}post"
- This results in A containing
- aval and B containing
- preavalpost.
+ This results in A containing
+ aval and B containing
+ preavalpost.
@@ -65,10 +65,10 @@
A ?= "aval"
- If A is set before the above is called,
+ If A is set before the above is called,
it will retain its previous value.
- If A is unset prior to the above call,
- A will be set to aval.
+ If A is unset prior to the above call,
+ A will be set to aval.
Note that this assignment is immediate, so if there are multiple ?= assignments
to a single variable, the first of those will be used.
@@ -82,14 +82,14 @@
A ??= "somevalue"
A ??= "someothervalue"
- If A is set before the above,
+ If A is set before the above,
it will retain that value.
- If A is unset prior to the above,
- A will be set to someothervalue.
+ If A is unset prior to the above,
+ A will be set to someothervalue.
This is a lazy/weak assignment in that the assignment does not occur until the end
of the parsing process, so that the last, rather than the first,
??= assignment to a given variable will be used.
- Any other setting of A using = or ?=
+ Any other setting of A using = or ?=
will however override the value set with ??=
@@ -107,7 +107,10 @@
C = "cval"
C := "${C}append"
- In that example, A would contain test 123, B would contain 456 bval, and C would be cvalappend.
+ In that example, A would contain
+ test 123, B would contain
+ 456 bval, and C
+ would be cvalappend.
@@ -121,7 +124,9 @@
C = "cval"
C =+ "test"
- In this example, B is now bval additionaldata and C is test cval.
+ In this example, B is now
+ bval additionaldata and C
+ is test cval.
@@ -135,9 +140,9 @@
C = "cval"
C =. "test"
- In this example, B is now
- bvaladditionaldata and
- C is testcval.
+ In this example, B is now
+ bvaladditionaldata and
+ C is testcval.
In contrast to the above appending and prepending operators,
no additional space will be introduced.
@@ -153,11 +158,11 @@
C = "cval"
C_prepend = "additional data "
- This example results in B
- becoming bval additional data
- and C becoming
- additional data cval.
- Note the spaces in the append.
+ This example results in B
+ becoming bval additional data
+ and C becoming
+ additional data cval.
+ Note the spaces in the _append.
Unlike the += operator, additional space is not automatically added.
You must take steps to add space
yourself.
@@ -172,7 +177,7 @@ yourself.
FOO_remove = "123"
FOO_remove = "456"
- In this example, FOO is now 789 123456.
+ In this example, FOO is now 789 123456.
@@ -186,8 +191,8 @@ yourself.
VARIABLE[SOMEFLAG] = "value"
- In this example, VARIABLE has a flag,
- SOMEFLAG which is set to value.
+ In this example, VARIABLE has a flag,
+ SOMEFLAG which is set to value.
@@ -198,7 +203,7 @@ yourself.
DATE = "${@time.strftime('%Y%m%d',time.gmtime())}"
- This would result in the DATE
+ This would result in the DATE
variable containing today's date.
@@ -207,10 +212,10 @@ yourself.
Conditional metadata set
- OVERRIDES is a :
separated variable containing
+ OVERRIDES is a :
separated variable containing
each item you want to satisfy conditions.
So, if you have a variable which is conditional on arm
, and arm
- is in OVERRIDES, then the arm
specific
+ is in OVERRIDES, then the arm
specific
version of the variable is used rather than the non-conditional
version.
Example:
@@ -220,9 +225,9 @@ yourself.
TEST_os = "osspecificvalue"
TEST_condnotinoverrides = "othercondvalue"
- In this example, TEST would be
- osspecificvalue, due to the condition
- os
being in OVERRIDES.
+ In this example, TEST would be
+ osspecificvalue, due to the condition
+ os
being in OVERRIDES.
@@ -231,14 +236,14 @@ yourself.
BitBake also supports appending and prepending to variables based
- on whether something is in OVERRIDES. Example:
+ on whether something is in OVERRIDES. Example:
DEPENDS = "glibc ncurses"
OVERRIDES = "machine:local"
DEPENDS_append_machine = "libmad"
- In this example, DEPENDS is set to
- glibc ncurses libmad.
+ In this example, DEPENDS is set to
+ "glibc ncurses libmad".
@@ -263,27 +268,27 @@ yourself.
OVERRIDES = "foo"
A_foo_append = "X"
- In this case, X is unconditionally appended
- to the variable A_foo.
- Since foo is an override, A_foo would then replace
- A.
+ In this case, X is unconditionally appended
+ to the variable A_foo.
+ Since foo is an override, A_foo would then replace
+ A.
OVERRIDES = "foo"
A = "X"
A_append_foo = "Y"
- In this case, only when foo is in
- OVERRIDES, Y
- is appended to the variable A
- so the value of A would
- become XY (NB: no spaces are appended).
+ In this case, only when foo is in
+ OVERRIDES, Y
+ is appended to the variable A
+ so the value of A would
+ become XY (NB: no spaces are appended).
OVERRIDES = "foo"
A_foo_append = "X"
A_foo_append += "Y"
This behaves as per the first case above, but the value of
- A would be "X Y" instead of just "X".
+ A would be "X Y" instead of just "X".
A = "1"
A_append = "2"
@@ -291,7 +296,7 @@ yourself.
A += "4"
A .= "5"
- Would ultimately result in A taking the value
+ Would ultimately result in A taking the value
"1 4523" since the _append operator executes at the
same time as the expansion of other overrides.
@@ -308,7 +313,7 @@ yourself.
B = "2"
A2 = "Y"
- So in this case A2 would take the value of "X".
+ So in this case A2 would take the value of "X".
@@ -322,14 +327,14 @@ yourself.
This is only supported in .bb and .bbclass files.
- The inherit directive is a means of specifying what classes
- of functionality your .bb requires.
+ The inherit directive is a means of specifying what classes
+ of functionality your .bb requires.
It is a rudimentary form of inheritance.
For example, you can easily abstract out the tasks involved in
building a package that uses autoconf and automake, and put
that into a bbclass for your packages to make use of.
A given bbclass is located by searching for classes/filename.bbclass
- in BBPATH, where filename is what you inherited.
+ in BBPATH, where filename is what you inherited.
@@ -337,22 +342,22 @@ yourself.
Inclusion
- Next, there is the include directive, which causes BitBake to parse whatever file you specify,
+ Next, there is the include directive, which causes BitBake to parse whatever file you specify,
and insert it at that location, which is not unlike make.
- However, if the path specified on the include line is a
+ However, if the path specified on the include line is a
relative path, BitBake will locate the first one it can find
- within BBPATH.
+ within BBPATH.
Requiring inclusion
- In contrast to the include directive, require will
+ In contrast to the include directive, require will
raise an
ParseError if the file to be included cannot
be found.
- Otherwise it will behave just like the include directive.
+ Otherwise it will behave just like the include directive.
@@ -371,7 +376,7 @@ raise an
SOMECONDITION = "1"
DEPENDS = "${@get_depends(d)}"
- This would result in DEPENDS containing dependencywithcond.
+ This would result in DEPENDS containing dependencywithcond.
@@ -397,7 +402,7 @@ python do_printdate () {
Tasks
NOTE: This is only supported in .bb and .bbclass files.
- In BitBake, each step that needs to be run for a given .bb is known as a task. There is a command addtask to add new tasks (must be a defined Python executable metadata and must start with do_
) and describe intertask dependencies.
+ In BitBake, each step that needs to be run for a given .bb is known as a task. There is a command addtask to add new tasks (must be a defined Python executable metadata and must start with do_
) and describe intertask dependencies.
python do_printdate () {
import time print
@@ -437,28 +442,29 @@ python do_printdate () {
BitBake will first search the current working directory for an
- optional "conf/bblayers.conf" configuration file.
- This file is expected to contain a BBLAYERS
+ optional conf/bblayers.conf configuration file.
+ This file is expected to contain a BBLAYERS
variable which is a space delimited list of 'layer' directories.
- For each directory in this list, a "conf/layer.conf"
+ For each directory in this list, a conf/layer.conf
file will be searched for and parsed with the
- LAYERDIR variable being set to the directory where
+ LAYERDIR variable being set to the directory where
the layer was found.
- The idea is these files will setup BBPATH
+ The idea is these files will setup BBPATH
and other variables correctly for a given build directory automatically
for the user.
- BitBake will then expect to find 'conf/bitbake.conf'
- somewhere in the user specified BBPATH.
+ BitBake will then expect to find conf/bitbake.conf
+ somewhere in the user specified BBPATH.
That configuration file generally has include directives to pull
in any other metadata (generally files specific to architecture,
machine, local and so on).
- Only variable definitions and include directives are allowed in .conf files.
+ Only variable definitions and include directives are allowed
+ in .conf files.
@@ -466,23 +472,23 @@ python do_printdate () {
BitBake classes are our rudimentary inheritance mechanism.
As briefly mentioned in the metadata introduction, they're
- parsed when an inherit directive is encountered, and they
- are located in classes/
- relative to the directories in BBPATH.
+ parsed when an inherit directive is encountered, and they
+ are located in the classes/ directory
+ relative to the directories in BBPATH.
- .bb files
+ ..bb files
- BitBake (.bb) file is a logical unit
+ BitBake (.bb) file is a logical unit
of tasks to be executed.
Normally this is a package to be built.
- Inter-.bb dependencies are obeyed.
+ Inter-.bb dependencies are obeyed.
The files themselves are located via
- the BBFILES variable, which
- is set to a space separated list of .bb
+ the BBFILES variable, which
+ is set to a space separated list of .bb
files, and does handle wildcards.
@@ -493,13 +499,14 @@ python do_printdate () {
NOTE:
- This is only supported in .bb and .bbclass files.
+ This is only supported in .bb
+ and .bbclass files.
BitBake allows installation of event handlers.
Events are triggered at certain points during operation,
such as the beginning of operation against a given
- .bb, the start of a given task,
+ .bb, the start of a given task,
task failure, task success, et cetera.
The intent is to make it easy to do things like email
notification on build failure.
@@ -514,16 +521,16 @@ python do_printdate () {
This event handler gets called every time an event is
triggered.
- A global variable e is defined.
- e.data contains an instance of
- bb.data.
- With the getName(e) method one can get
+ A global variable e is defined.
+ e.data contains an instance of
+ bb.data.
+ With the getName(e) method one can get
the name of the triggered event.
The above event handler prints the name of the event
- and the content of the FILE variable.
+ and the content of the FILE variable.
@@ -536,7 +543,7 @@ python do_printdate () {
- The first is BBCLASSEXTEND.
+ The first is BBCLASSEXTEND.
This variable is a space separated list of classes used to "extend" the
recipe for each variant.
As an example, setting
@@ -548,10 +555,10 @@ python do_printdate () {
This second incarnation will have the "native" class inherited.
- The second feature is BBVERSIONS.
+ The second feature is BBVERSIONS.
This variable allows a single recipe to build multiple versions of a
project from a single recipe file, and allows you to specify
- conditional metadata (using the OVERRIDES
+ conditional metadata (using the OVERRIDES
mechanism) for a single version, or an optionally named range of versions:
BBVERSIONS = "1.0 2.0 git"
@@ -562,12 +569,12 @@ python do_printdate () {
SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;patch=1"
Note that the name of the range will default to the original version of the
- recipe, so given OE, a recipe file of foo_1.0.0+.bb
- will default the name of its versions to 1.0.0+.
+ recipe, so given OE, a recipe file of foo_1.0.0+.bb
+ will default the name of its versions to 1.0.0+.
This is useful, as the range name is not only placed into overrides;
it's also made available for the metadata to use in the form of the
- BPV variable, for use in
- file:// search paths (FILESPATH).
+ BPV variable, for use in
+ file:// search paths (FILESPATH).
@@ -582,12 +589,12 @@ python do_printdate () {
- Dependencies internal to the .bb file
+ Dependencies internal to the .bb file
Where the dependencies are internal to a given
- .bb file, the dependencies are handled by the
- previously detailed addtask directive.
+ .bb file, the dependencies are handled by the
+ previously detailed addtask directive.
@@ -595,16 +602,16 @@ python do_printdate () {
Build Dependencies
- DEPENDS lists build time dependencies.
+ DEPENDS lists build time dependencies.
The 'deptask' flag for tasks is used to signify the task of each
- item listed in DEPENDS which must have
+ item listed in DEPENDS which must have
completed before that task can be executed.
do_configure[deptask] = "do_populate_staging"
- means the do_populate_staging
- task of each item in DEPENDS must have completed before
- do_configure can execute.
+ means the do_populate_staging
+ task of each item in DEPENDS must have completed before
+ do_configure can execute.
@@ -612,18 +619,18 @@ python do_printdate () {
Runtime Dependencies
- The PACKAGES variable lists runtime
- packages and each of these can have RDEPENDS and
- RRECOMMENDS runtime dependencies.
+ The PACKAGES variable lists runtime
+ packages and each of these can have RDEPENDS and
+ RRECOMMENDS runtime dependencies.
The 'rdeptask' flag for tasks is used to signify the task of each
item runtime dependency which must have completed before that
task can be executed.
do_package_write[rdeptask] = "do_package"
- means the do_package
- task of each item in RDEPENDS must have
- completed before do_package_write can execute.
+ means the do_package
+ task of each item in RDEPENDS must have
+ completed before do_package_write can execute.
@@ -649,7 +656,7 @@ python do_printdate () {
build and runtime dependencies of dependent tasks too.
If that is the case, the taskname itself should
be referenced in the task list, e.g.
- do_a[recrdeptask] = "do_a do_b".
+ do_a[recrdeptask] = "do_a do_b".
@@ -659,13 +666,13 @@ python do_printdate () {
The 'depends' flag for tasks is a more generic form of which
allows an interdependency on specific tasks rather than specifying
- the data in DEPENDS.
+ the data in DEPENDS.
do_patch[depends] = "quilt-native:do_populate_staging"
- means the do_populate_staging
+ means the do_populate_staging
task of the target quilt-native must have completed before the
- do_patch can execute.
+ do_patch task can execute.