diff options
| -rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index 436abd5ec1..f7b541d9d1 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | |||
| @@ -316,7 +316,7 @@ | |||
| 316 | </literallayout> | 316 | </literallayout> |
| 317 | <note> | 317 | <note> |
| 318 | It is never necessary to use "+=" together with "_append". | 318 | It is never necessary to use "+=" together with "_append". |
| 319 | The following sequence of assignments appepnds "barbaz" to | 319 | The following sequence of assignments appends "barbaz" to |
| 320 | <filename>FOO</filename>: | 320 | <filename>FOO</filename>: |
| 321 | <literallayout class='monospaced'> | 321 | <literallayout class='monospaced'> |
| 322 | FOO_append = "bar" | 322 | FOO_append = "bar" |
| @@ -401,6 +401,21 @@ | |||
| 401 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" | 401 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" |
| 402 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" | 402 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" |
| 403 | </literallayout> | 403 | </literallayout> |
| 404 | <note> | ||
| 405 | Inline Python expressions work just like variable expansions | ||
| 406 | insofar as the "=" and ":=" operators are concerned. | ||
| 407 | Given the following assignment, <filename>foo()</filename> | ||
| 408 | is called each time <filename>FOO</filename> is expanded: | ||
| 409 | <literallayout class='monospaced'> | ||
| 410 | FOO = "${@foo()}" | ||
| 411 | </literallayout> | ||
| 412 | Contrast this with the following immediate assignment, where | ||
| 413 | <filename>foo()</filename> is only called once, while the | ||
| 414 | assignment is parsed: | ||
| 415 | <literallayout class='monospaced'> | ||
| 416 | FOO := "${@foo()}" | ||
| 417 | </literallayout> | ||
| 418 | </note> | ||
| 404 | </para> | 419 | </para> |
| 405 | </section> | 420 | </section> |
| 406 | 421 | ||
