bitbake: doc: bitbake-user-manual: Add more explanations to OVERRIDES
A message that is not in the archive (sent off-list or not yet received): [email protected]
I wrote this patch as a follow-up to our discussion on IRC last week. Not sure regarding the MACHINE variable I mentioned – should/can I link to the poky docs directly there?
Simon
Am Mo., 15. Nov. 2021 um 13:45 Uhr schrieb Simon A. Eugster via lists.yoctoproject.org <[email protected]>:
Quoted 123 lines
Signed-off-by Simon A. Eugster <[email protected]>--- bitbake/doc/README | 3 +- .../bitbake-user-manual-metadata.rst | 35 +++++++++++++------ 2 files changed, 25 insertions(+), 13 deletions(-)bitbake/doc/README +1
-2@@ -47,8 +47,7 @@ To install all required packages run: To build the documentation locally, run: - $ cd documentation - $ make -f Makefile.sphinx html + $ make html The resulting HTML index page will be _build/html/index.html, and you can browse your own copy of the locally generated documentation withdiff --git
a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rstb/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rstindex119720d527..3449bc1f68100644bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +1
-1@@ -268,7 +268,7 @@ examples:: C = "cval" C =. "test" -The variable :term:`B` contains "bvaladditionaldata" and ``C`` contains +The variable ``B`` contains "bvaladditionaldata" and ``C`` contains "testcval". Appending and Prepending (Override Style Syntax)@@ -300,6 +300,12 @@ It is also possible to append and prepend to shellfunctions and
BitBake-style Python functions. See the
":ref:bitbake-user-manual/bitbake-user-manual-metadata:shell functions" and ":ref:bitbake-user-manual/bitbake-user-manual-metadata:bitbake-style python functions"
sections for examples.+.. note::
bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +2
-0+ + Before Honister (3.4), override style used ``_`` instead of ``:``, soyou will
bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +4
-1+ still find a lot of documentation using “_append”, “_prepend”, and + “_remove”. + .. _removing-override-style-syntax: Removal (Override Style Syntax)@@ -517,20 +523,21 @@ variable. - *Selecting a Variable:* The :term:`OVERRIDES` variable is a colon-character-separated list that contains items for which you want to satisfy conditions. Thus, if you have a variable that is - conditional on "arm", and "arm" is in :term:`OVERRIDES`, then the + conditional on "arm", and "arm" is listed in :term:`OVERRIDES`, thenthe
"arm"-specific version of the variable is used rather than the non-conditional version. Here is an example::bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +16
-10- OVERRIDES = "architecture:os:machine" + OVERRIDES = "foo:linux:arm" TEST = "default" - TEST_os = "osspecific" - TEST_nooverride = "othercondvalue" + TEST:arm = "armspecific" + TEST:nooverride = "othercondvalue" - In this example, the :term:`OVERRIDES` - variable lists three overrides: "architecture", "os", and "machine". - The variable ``TEST`` by itself has a default value of "default". You - select the os-specific version of the ``TEST`` variable by appending - the "os" override to the variable (i.e. ``TEST_os``). + In this example, the :term:`OVERRIDES` variable lists three + overrides: "foo", "linux", and "arm". The variable ``TEST`` by itself + has a default value of "default", and the value of the “arm” specific + version “armspecific” is used because :term:`OVERRIDES` contains + “arm”. The “nooverride” specific version is not used because + :term:`OVERRIDES` does not contain “nooverride”. To better understand this, consider a practical example that assumes an OpenEmbedded metadata-based Linux kernel recipe file. The@@ -546,15 +553,21 @@ variable. KBRANCH:qemux86-64 = "standard/common-pc-64/base" KBRANCH:qemumips64 = "standard/mti-malta64" + This works because in poky the :term:`OVERRIDES` variable by default + includes the ``MACHINE`` variable, which is set to e.g. “qemux86”. + - *Appending and Prepending:* BitBake also supports append and prepend operations to variable values based on whether a specific item is listed in :term:`OVERRIDES`. Here is an example:: DEPENDS = "glibc ncurses" OVERRIDES = "machine:local" + DEPENDS:append = "defaultappend" DEPENDS:append:machine = "libmad" - In this example, :term:`DEPENDS` becomes "glibc ncurses libmad". + In this example, :term:`DEPENDS` becomes "glibc ncurses libmad". The + default append is ``DEPENDS:append`` is not used because the override + mechanism choses the specific ``:append``. Again, using an OpenEmbedded metadata-based kernel recipe file as an example, the following lines will conditionally append to the --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#2153):
https://lists.yoctoproject.org/g/docs/message/2153
Mute This Topic: https://lists.yoctoproject.org/mt/87068011/6562396
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-