]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: bitbake-user-manual: Updated the "Inline Python Variable Expansion" section.
authorScott Rifenbark <srifenbark@gmail.com>
Thu, 21 Jul 2016 18:02:52 +0000 (11:02 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Aug 2016 14:22:15 +0000 (15:22 +0100)
Fixes [YOCTO #9984]

Added a small note to the bottom to help clarify.

(Bitbake rev: 64bf49826088c56b739ed971251f05b4564c712e)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml

index 436abd5ec1a6daa2d8833fd2760c7320a27b1f62..f7b541d9d1dc99635617b89807a675c609ba4f89 100644 (file)
                 </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"
      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>