From 2d7cf6c056691b6de81bdbb029225d7e0e16f37b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 30 Jul 2021 13:47:00 +0100 Subject: bitbake: doc/lib: Update to use new override syntax containing colons This runs the overrides conversion script in OE-Core over the bitbake code base including the docs. A handful of things were excluded in toaster and for the Changelog file. (Bitbake rev: 47f8d3b24fd52381bf3b41e2f55a53e57841344c) Signed-off-by: Richard Purdie --- .../bitbake-user-manual-metadata.rst | 64 +++++++++++----------- .../bitbake-user-manual-ref-variables.rst | 14 ++--- 2 files changed, 39 insertions(+), 39 deletions(-) (limited to 'bitbake/doc') 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 rather than being immediately applied. Here are some examples:: B = "bval" - B_append = " additional data" + B:append = " additional data" C = "cval" - C_prepend = "additional data " + C:prepend = "additional data " D = "dval" - D_append = "additional data" + D:append = "additional data" The variable :term:`B` 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. Surrounding spaces and spacing are preserved. Here is an example:: FOO = "123 456 789 123456 123 456 123 456" - FOO_remove = "123" - FOO_remove = "456" + FOO:remove = "123" + FOO:remove = "456" FOO2 = " abc def ghi abcdef abc def abc def def" - FOO2_remove = "\ + FOO2:remove = "\ def \ abc \ ghi \ @@ -349,15 +349,15 @@ If, on the other hand, ``foo.bbclass`` uses the "_append" operator, then the final value of ``FOO`` will be "initial val", as intended:: - FOO_append = " val" + FOO:append = " val" .. note:: It is never necessary to use "+=" together with "_append". The following sequence of assignments appends "barbaz" to FOO:: - FOO_append = "bar" - FOO_append = "baz" + FOO:append = "bar" + FOO:append = "baz" The only effect of changing the second assignment in the previous @@ -538,12 +538,12 @@ variable. that value based on the architecture of the build:: KBRANCH = "standard/base" - KBRANCH_qemuarm = "standard/arm-versatile-926ejs" - KBRANCH_qemumips = "standard/mti-malta32" - KBRANCH_qemuppc = "standard/qemuppc" - KBRANCH_qemux86 = "standard/common-pc/base" - KBRANCH_qemux86-64 = "standard/common-pc-64/base" - KBRANCH_qemumips64 = "standard/mti-malta64" + KBRANCH:qemuarm = "standard/arm-versatile-926ejs" + KBRANCH:qemumips = "standard/mti-malta32" + KBRANCH:qemuppc = "standard/qemuppc" + KBRANCH:qemux86 = "standard/common-pc/base" + KBRANCH:qemux86-64 = "standard/common-pc-64/base" + KBRANCH:qemumips64 = "standard/mti-malta64" - *Appending and Prepending:* BitBake also supports append and prepend operations to variable values based on whether a specific item is @@ -551,7 +551,7 @@ variable. DEPENDS = "glibc ncurses" OVERRIDES = "machine:local" - DEPENDS_append_machine = "libmad" + DEPENDS:append_machine = "libmad" In this example, :term:`DEPENDS` becomes "glibc ncurses libmad". @@ -559,15 +559,15 @@ variable. example, the following lines will conditionally append to the ``KERNEL_FEATURES`` variable based on the architecture:: - KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" - KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" - KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" + KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}" + KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" + KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" - *Setting a Variable for a Single Task:* BitBake supports setting a variable just for the duration of a single task. Here is an example:: FOO_task-configure = "val 1" - FOO_task-compile = "val 2" + FOO:task-compile = "val 2" In the previous example, ``FOO`` has the value "val 1" while the @@ -582,7 +582,7 @@ variable. You can also use this syntax with other combinations (e.g. "``_prepend``") as shown in the following example:: - EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} " + EXTRA_OEMAKE:prepend:task-compile = "${PARALLEL_MAKE} " Key Expansion ------------- @@ -618,7 +618,7 @@ example:: OVERRIDES = "foo" A = "Z" - A_foo_append = "X" + A_foo:append = "X" For this case, ``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:: OVERRIDES = "foo" A = "Z" - A_append_foo = "X" + A:append_foo = "X" For this case, before overrides are handled, ``A`` is set to "Z" and ``A_append_foo`` is set @@ -648,8 +648,8 @@ back as in the first example:: OVERRIDES = "foo" A = "Y" - A_foo_append = "Z" - A_foo_append = "X" + A_foo:append = "Z" + A_foo:append = "X" For this case, before any overrides are resolved, ``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 This final example mixes in some varying operators:: A = "1" - A_append = "2" - A_append = "3" + A:append = "2" + A:append = "3" A += "4" A .= "5" @@ -919,7 +919,7 @@ As an example, consider the following:: fn } - fn_prepend() { + fn:prepend() { bbplain second } @@ -927,7 +927,7 @@ As an example, consider the following:: bbplain third } - do_foo_append() { + do_foo:append() { bbplain fourth } @@ -977,7 +977,7 @@ override-style operators to BitBake-style Python functions. As an example, consider the following:: - python do_foo_prepend() { + python do_foo:prepend() { bb.plain("first") } @@ -985,7 +985,7 @@ As an example, consider the following:: bb.plain("second") } - python do_foo_append() { + python do_foo:append() { bb.plain("third") } @@ -1139,7 +1139,7 @@ before anonymous functions run. In the following example, ``FOO`` ends up with the value "foo from anonymous":: FOO = "foo" - FOO_append = " from outside" + FOO:append = " from outside" python () { d.setVar("FOO", "foo from anonymous") diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst index 797e2a00cc..6283c2654c 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst @@ -1118,7 +1118,7 @@ overview of their function and contents. attempt before any others by adding something like the following to your configuration:: - PREMIRRORS_prepend = "\ + PREMIRRORS:prepend = "\ git://.*/.* http://www.yoctoproject.org/sources/ \n \ ftp://.*/.* http://www.yoctoproject.org/sources/ \n \ http://.*/.* http://www.yoctoproject.org/sources/ \n \ @@ -1184,7 +1184,7 @@ overview of their function and contents. that depends on the ``perl`` package. In this case, you would use the following :term:`RDEPENDS` statement:: - RDEPENDS_${PN}-dev += "perl" + RDEPENDS:${PN}-dev += "perl" In the example, the development package depends on the ``perl`` package. Thus, the :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part @@ -1195,7 +1195,7 @@ overview of their function and contents. differences from you. Here is the general syntax to specify versions with the :term:`RDEPENDS` variable:: - RDEPENDS_${PN} = "package (operator version)" + RDEPENDS:${PN} = "package (operator version)" For ``operator``, you can specify the following:: @@ -1208,7 +1208,7 @@ overview of their function and contents. For example, the following sets up a dependency on version 1.2 or greater of the package ``foo``:: - RDEPENDS_${PN} = "foo (>= 1.2)" + RDEPENDS:${PN} = "foo (>= 1.2)" For information on build-time dependencies, see the :term:`DEPENDS` variable. @@ -1237,7 +1237,7 @@ overview of their function and contents. variable in conjunction with a package name override. Here is an example:: - RPROVIDES_${PN} = "widget-abi-2" + RPROVIDES:${PN} = "widget-abi-2" :term:`RRECOMMENDS` A list of packages that extends the usability of a package being @@ -1251,7 +1251,7 @@ overview of their function and contents. differences from you. Here is the general syntax to specify versions with the :term:`RRECOMMENDS` variable:: - RRECOMMENDS_${PN} = "package (operator version)" + RRECOMMENDS:${PN} = "package (operator version)" For ``operator``, you can specify the following:: @@ -1264,7 +1264,7 @@ overview of their function and contents. For example, the following sets up a recommend on version 1.2 or greater of the package ``foo``:: - RRECOMMENDS_${PN} = "foo (>= 1.2)" + RRECOMMENDS:${PN} = "foo (>= 1.2)" :term:`SECTION` The section in which packages should be categorized. -- cgit v1.2.3-54-g00ecf