aboutsummaryrefslogtreecommitdiffstats
path: root/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2016-07-21 11:02:52 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-02 15:20:10 +0100
commit64bf49826088c56b739ed971251f05b4564c712e (patch)
treee63a94b737a59cf60445edba77e269187b6e3111 /doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
parent5c5b88e402376268baa15c5d04d2592f28d76751 (diff)
downloadbitbake-64bf49826088c56b739ed971251f05b4564c712e.tar.gz
bitbake-64bf49826088c56b739ed971251f05b4564c712e.tar.bz2
bitbake-64bf49826088c56b739ed971251f05b4564c712e.zip
bitbake-user-manual: Updated the "Inline Python Variable Expansion" section.
Fixes [YOCTO #9984] Added a small note to the bottom to help clarify. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Diffstat (limited to 'doc/bitbake-user-manual/bitbake-user-manual-metadata.xml')
-rw-r--r--doc/bitbake-user-manual/bitbake-user-manual-metadata.xml17
1 files changed, 16 insertions, 1 deletions
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index 436abd5e..f7b541d9 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -316,7 +316,7 @@
</literallayout>
<note>
It is never necessary to use "+=" together with "_append".
- The following sequence of assignments appepnds "barbaz" to
+ The following sequence of assignments appends "barbaz" to
<filename>FOO</filename>:
<literallayout class='monospaced'>
FOO_append = "bar"
@@ -401,6 +401,21 @@
PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
</literallayout>
+ <note>
+ Inline Python expressions work just like variable expansions
+ insofar as the "=" and ":=" operators are concerned.
+ Given the following assignment, <filename>foo()</filename>
+ is called each time <filename>FOO</filename> is expanded:
+ <literallayout class='monospaced'>
+ FOO = "${@foo()}"
+ </literallayout>
+ Contrast this with the following immediate assignment, where
+ <filename>foo()</filename> is only called once, while the
+ assignment is parsed:
+ <literallayout class='monospaced'>
+ FOO := "${@foo()}"
+ </literallayout>
+ </note>
</para>
</section>