diff options
Diffstat (limited to 'bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst')
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst index 3e14163ebe..db44e26fbd 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | |||
@@ -281,11 +281,11 @@ operators in that their effects are applied at variable expansion time | |||
281 | rather than being immediately applied. Here are some examples:: | 281 | rather than being immediately applied. Here are some examples:: |
282 | 282 | ||
283 | B = "bval" | 283 | B = "bval" |
284 | B_append = " additional data" | 284 | B:append = " additional data" |
285 | C = "cval" | 285 | C = "cval" |
286 | C_prepend = "additional data " | 286 | C:prepend = "additional data " |
287 | D = "dval" | 287 | D = "dval" |
288 | D_append = "additional data" | 288 | D:append = "additional data" |
289 | 289 | ||
290 | The variable :term:`B` | 290 | The variable :term:`B` |
291 | becomes "bval additional data" and ``C`` becomes "additional data cval". | 291 | becomes "bval additional data" and ``C`` becomes "additional data cval". |
@@ -312,10 +312,10 @@ When you use this syntax, BitBake expects one or more strings. | |||
312 | Surrounding spaces and spacing are preserved. Here is an example:: | 312 | Surrounding spaces and spacing are preserved. Here is an example:: |
313 | 313 | ||
314 | FOO = "123 456 789 123456 123 456 123 456" | 314 | FOO = "123 456 789 123456 123 456 123 456" |
315 | FOO_remove = "123" | 315 | FOO:remove = "123" |
316 | FOO_remove = "456" | 316 | FOO:remove = "456" |
317 | FOO2 = " abc def ghi abcdef abc def abc def def" | 317 | FOO2 = " abc def ghi abcdef abc def abc def def" |
318 | FOO2_remove = "\ | 318 | FOO2:remove = "\ |
319 | def \ | 319 | def \ |
320 | abc \ | 320 | abc \ |
321 | ghi \ | 321 | ghi \ |
@@ -349,15 +349,15 @@ If, on the other hand, ``foo.bbclass`` | |||
349 | uses the "_append" operator, then the final value of ``FOO`` will be | 349 | uses the "_append" operator, then the final value of ``FOO`` will be |
350 | "initial val", as intended:: | 350 | "initial val", as intended:: |
351 | 351 | ||
352 | FOO_append = " val" | 352 | FOO:append = " val" |
353 | 353 | ||
354 | .. note:: | 354 | .. note:: |
355 | 355 | ||
356 | It is never necessary to use "+=" together with "_append". The following | 356 | It is never necessary to use "+=" together with "_append". The following |
357 | sequence of assignments appends "barbaz" to FOO:: | 357 | sequence of assignments appends "barbaz" to FOO:: |
358 | 358 | ||
359 | FOO_append = "bar" | 359 | FOO:append = "bar" |
360 | FOO_append = "baz" | 360 | FOO:append = "baz" |
361 | 361 | ||
362 | 362 | ||
363 | The only effect of changing the second assignment in the previous | 363 | The only effect of changing the second assignment in the previous |
@@ -538,12 +538,12 @@ variable. | |||
538 | that value based on the architecture of the build:: | 538 | that value based on the architecture of the build:: |
539 | 539 | ||
540 | KBRANCH = "standard/base" | 540 | KBRANCH = "standard/base" |
541 | KBRANCH_qemuarm = "standard/arm-versatile-926ejs" | 541 | KBRANCH:qemuarm = "standard/arm-versatile-926ejs" |
542 | KBRANCH_qemumips = "standard/mti-malta32" | 542 | KBRANCH:qemumips = "standard/mti-malta32" |
543 | KBRANCH_qemuppc = "standard/qemuppc" | 543 | KBRANCH:qemuppc = "standard/qemuppc" |
544 | KBRANCH_qemux86 = "standard/common-pc/base" | 544 | KBRANCH:qemux86 = "standard/common-pc/base" |
545 | KBRANCH_qemux86-64 = "standard/common-pc-64/base" | 545 | KBRANCH:qemux86-64 = "standard/common-pc-64/base" |
546 | KBRANCH_qemumips64 = "standard/mti-malta64" | 546 | KBRANCH:qemumips64 = "standard/mti-malta64" |
547 | 547 | ||
548 | - *Appending and Prepending:* BitBake also supports append and prepend | 548 | - *Appending and Prepending:* BitBake also supports append and prepend |
549 | operations to variable values based on whether a specific item is | 549 | operations to variable values based on whether a specific item is |
@@ -551,7 +551,7 @@ variable. | |||
551 | 551 | ||
552 | DEPENDS = "glibc ncurses" | 552 | DEPENDS = "glibc ncurses" |
553 | OVERRIDES = "machine:local" | 553 | OVERRIDES = "machine:local" |
554 | DEPENDS_append_machine = "libmad" | 554 | DEPENDS:append_machine = "libmad" |
555 | 555 | ||
556 | In this example, :term:`DEPENDS` becomes "glibc ncurses libmad". | 556 | In this example, :term:`DEPENDS` becomes "glibc ncurses libmad". |
557 | 557 | ||
@@ -559,15 +559,15 @@ variable. | |||
559 | example, the following lines will conditionally append to the | 559 | example, the following lines will conditionally append to the |
560 | ``KERNEL_FEATURES`` variable based on the architecture:: | 560 | ``KERNEL_FEATURES`` variable based on the architecture:: |
561 | 561 | ||
562 | KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" | 562 | KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" |
563 | KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" | 563 | KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" |
564 | KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" | 564 | KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" |
565 | 565 | ||
566 | - *Setting a Variable for a Single Task:* BitBake supports setting a | 566 | - *Setting a Variable for a Single Task:* BitBake supports setting a |
567 | variable just for the duration of a single task. Here is an example:: | 567 | variable just for the duration of a single task. Here is an example:: |
568 | 568 | ||
569 | FOO_task-configure = "val 1" | 569 | FOO_task-configure = "val 1" |
570 | FOO_task-compile = "val 2" | 570 | FOO:task-compile = "val 2" |
571 | 571 | ||
572 | In the | 572 | In the |
573 | previous example, ``FOO`` has the value "val 1" while the | 573 | previous example, ``FOO`` has the value "val 1" while the |
@@ -582,7 +582,7 @@ variable. | |||
582 | You can also use this syntax with other combinations (e.g. | 582 | You can also use this syntax with other combinations (e.g. |
583 | "``_prepend``") as shown in the following example:: | 583 | "``_prepend``") as shown in the following example:: |
584 | 584 | ||
585 | EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} " | 585 | EXTRA_OEMAKE:prepend:task-compile = "${PARALLEL_MAKE} " |
586 | 586 | ||
587 | Key Expansion | 587 | Key Expansion |
588 | ------------- | 588 | ------------- |
@@ -618,7 +618,7 @@ example:: | |||
618 | 618 | ||
619 | OVERRIDES = "foo" | 619 | OVERRIDES = "foo" |
620 | A = "Z" | 620 | A = "Z" |
621 | A_foo_append = "X" | 621 | A_foo:append = "X" |
622 | 622 | ||
623 | For this case, | 623 | For this case, |
624 | ``A`` is unconditionally set to "Z" and "X" is unconditionally and | 624 | ``A`` is unconditionally set to "Z" and "X" is unconditionally and |
@@ -635,7 +635,7 @@ This next example changes the order of the override and the append:: | |||
635 | 635 | ||
636 | OVERRIDES = "foo" | 636 | OVERRIDES = "foo" |
637 | A = "Z" | 637 | A = "Z" |
638 | A_append_foo = "X" | 638 | A:append_foo = "X" |
639 | 639 | ||
640 | For this case, before | 640 | For this case, before |
641 | overrides are handled, ``A`` is set to "Z" and ``A_append_foo`` is set | 641 | overrides are handled, ``A`` is set to "Z" and ``A_append_foo`` is set |
@@ -648,8 +648,8 @@ back as in the first example:: | |||
648 | 648 | ||
649 | OVERRIDES = "foo" | 649 | OVERRIDES = "foo" |
650 | A = "Y" | 650 | A = "Y" |
651 | A_foo_append = "Z" | 651 | A_foo:append = "Z" |
652 | A_foo_append = "X" | 652 | A_foo:append = "X" |
653 | 653 | ||
654 | For this case, before any overrides are resolved, | 654 | For this case, before any overrides are resolved, |
655 | ``A`` is set to "Y" using an immediate assignment. After this immediate | 655 | ``A`` is set to "Y" using an immediate assignment. After this immediate |
@@ -661,8 +661,8 @@ leaving the variable set to "ZX". Finally, applying the override for | |||
661 | This final example mixes in some varying operators:: | 661 | This final example mixes in some varying operators:: |
662 | 662 | ||
663 | A = "1" | 663 | A = "1" |
664 | A_append = "2" | 664 | A:append = "2" |
665 | A_append = "3" | 665 | A:append = "3" |
666 | A += "4" | 666 | A += "4" |
667 | A .= "5" | 667 | A .= "5" |
668 | 668 | ||
@@ -919,7 +919,7 @@ As an example, consider the following:: | |||
919 | fn | 919 | fn |
920 | } | 920 | } |
921 | 921 | ||
922 | fn_prepend() { | 922 | fn:prepend() { |
923 | bbplain second | 923 | bbplain second |
924 | } | 924 | } |
925 | 925 | ||
@@ -927,7 +927,7 @@ As an example, consider the following:: | |||
927 | bbplain third | 927 | bbplain third |
928 | } | 928 | } |
929 | 929 | ||
930 | do_foo_append() { | 930 | do_foo:append() { |
931 | bbplain fourth | 931 | bbplain fourth |
932 | } | 932 | } |
933 | 933 | ||
@@ -977,7 +977,7 @@ override-style operators to BitBake-style Python functions. | |||
977 | 977 | ||
978 | As an example, consider the following:: | 978 | As an example, consider the following:: |
979 | 979 | ||
980 | python do_foo_prepend() { | 980 | python do_foo:prepend() { |
981 | bb.plain("first") | 981 | bb.plain("first") |
982 | } | 982 | } |
983 | 983 | ||
@@ -985,7 +985,7 @@ As an example, consider the following:: | |||
985 | bb.plain("second") | 985 | bb.plain("second") |
986 | } | 986 | } |
987 | 987 | ||
988 | python do_foo_append() { | 988 | python do_foo:append() { |
989 | bb.plain("third") | 989 | bb.plain("third") |
990 | } | 990 | } |
991 | 991 | ||
@@ -1139,7 +1139,7 @@ before anonymous functions run. In the following example, ``FOO`` ends | |||
1139 | up with the value "foo from anonymous":: | 1139 | up with the value "foo from anonymous":: |
1140 | 1140 | ||
1141 | FOO = "foo" | 1141 | FOO = "foo" |
1142 | FOO_append = " from outside" | 1142 | FOO:append = " from outside" |
1143 | 1143 | ||
1144 | python () { | 1144 | python () { |
1145 | d.setVar("FOO", "foo from anonymous") | 1145 | d.setVar("FOO", "foo from anonymous") |