diff options
| -rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 26 |
1 files changed, 13 insertions, 13 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 ef191924ec..15b38cda8e 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | |||
| @@ -296,7 +296,7 @@ | |||
| 296 | 296 | ||
| 297 | <para> | 297 | <para> |
| 298 | No need exists to pre-define variable flags. | 298 | No need exists to pre-define variable flags. |
| 299 | You can simply start using them. | 299 | You can simply start using them. |
| 300 | One extremely common application | 300 | One extremely common application |
| 301 | is to attach some brief documentation to a BitBake variable as | 301 | is to attach some brief documentation to a BitBake variable as |
| 302 | follows: | 302 | follows: |
| @@ -323,12 +323,12 @@ | |||
| 323 | <para> | 323 | <para> |
| 324 | Probably the most common use of this feature is to extract | 324 | Probably the most common use of this feature is to extract |
| 325 | the value of variables from BitBake's internal data dictionary, | 325 | the value of variables from BitBake's internal data dictionary, |
| 326 | <filename>d</filename>. | 326 | <filename>d</filename>. |
| 327 | The following lines select the values of a package name | 327 | The following lines select the values of a package name |
| 328 | and its version number, respectively: | 328 | and its version number, respectively: |
| 329 | <literallayout class='monospaced'> | 329 | <literallayout class='monospaced'> |
| 330 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}" | 330 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}" |
| 331 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}" | 331 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}" |
| 332 | </literallayout> | 332 | </literallayout> |
| 333 | </para> | 333 | </para> |
| 334 | </section> | 334 | </section> |
| @@ -407,20 +407,20 @@ | |||
| 407 | 407 | ||
| 408 | <para> | 408 | <para> |
| 409 | To better understand this, consider a practical example | 409 | To better understand this, consider a practical example |
| 410 | that assumes an OpenEmbedded metadata-based Linux | 410 | that assumes an OpenEmbedded metadata-based Linux |
| 411 | kernel recipe file. | 411 | kernel recipe file. |
| 412 | The following lines from the recipe file first set | 412 | The following lines from the recipe file first set |
| 413 | the kernel branch variable <filename>KBRANCH</filename> | 413 | the kernel branch variable <filename>KBRANCH</filename> |
| 414 | to a default value, then conditionally override that | 414 | to a default value, then conditionally override that |
| 415 | value based on the architecture of the build: | 415 | value based on the architecture of the build: |
| 416 | <literallayout class='monospaced'> | 416 | <literallayout class='monospaced'> |
| 417 | KBRANCH = "standard/base" | 417 | KBRANCH = "standard/base" |
| 418 | KBRANCH_qemuarm = "standard/arm-versatile-926ejs" | 418 | KBRANCH_qemuarm = "standard/arm-versatile-926ejs" |
| 419 | KBRANCH_qemumips = "standard/mti-malta32" | 419 | KBRANCH_qemumips = "standard/mti-malta32" |
| 420 | KBRANCH_qemuppc = "standard/qemuppc" | 420 | KBRANCH_qemuppc = "standard/qemuppc" |
| 421 | KBRANCH_qemux86 = "standard/common-pc/base" | 421 | KBRANCH_qemux86 = "standard/common-pc/base" |
| 422 | KBRANCH_qemux86-64 = "standard/common-pc-64/base" | 422 | KBRANCH_qemux86-64 = "standard/common-pc-64/base" |
| 423 | KBRANCH_qemumips64 = "standard/mti-malta64" | 423 | KBRANCH_qemumips64 = "standard/mti-malta64" |
| 424 | </literallayout> | 424 | </literallayout> |
| 425 | </para></listitem> | 425 | </para></listitem> |
| 426 | <listitem><para><emphasis>Appending and Prepending:</emphasis> | 426 | <listitem><para><emphasis>Appending and Prepending:</emphasis> |
