diff options
| author | Paul Eggleton <paul.eggleton@microsoft.com> | 2021-10-11 11:27:14 +1300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-20 20:22:20 +0100 |
| commit | 1088e2d9d1fbd10da6faa31c987808a5d56bac68 (patch) | |
| tree | c628f156e44f0b355a093bf12f2b8c007150337c | |
| parent | 2d5e0f13e336ab6ff32ee86091a98a6bd84c154d (diff) | |
| download | poky-1088e2d9d1fbd10da6faa31c987808a5d56bac68.tar.gz | |
migration-3.4: tweak overrides change section
Minor grammar and readability improvements.
(From yocto-docs rev: e33a809d139d52a8aa262a25fe3031a8882dee2e)
Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | documentation/migration-guides/migration-3.4.rst | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/documentation/migration-guides/migration-3.4.rst b/documentation/migration-guides/migration-3.4.rst index e83e936b74..3df5b69945 100644 --- a/documentation/migration-guides/migration-3.4.rst +++ b/documentation/migration-guides/migration-3.4.rst | |||
| @@ -7,17 +7,18 @@ Project 3.4 Release (codename "honister") from the prior release. | |||
| 7 | Override syntax changes | 7 | Override syntax changes |
| 8 | ----------------------- | 8 | ----------------------- |
| 9 | 9 | ||
| 10 | This release requires changes to the metadata to indicate where overrides are | 10 | In this release, the ``:`` character replaces the use of ``_`` to |
| 11 | being used in variable key names. This is done with the ``:`` character replacing | 11 | refer to an override, most commonly when making a conditional assignment |
| 12 | the use of ``_`` previously. This means that an entry like:: | 12 | of a variable. This means that an entry like:: |
| 13 | 13 | ||
| 14 | SRC_URI_qemux86 = "file://somefile" | 14 | SRC_URI_qemux86 = "file://somefile" |
| 15 | 15 | ||
| 16 | becomes:: | 16 | now becomes:: |
| 17 | 17 | ||
| 18 | SRC_URI:qemux86 = "file://somefile" | 18 | SRC_URI:qemux86 = "file://somefile" |
| 19 | 19 | ||
| 20 | since ``qemux86`` is an override. This applies to any use of override syntax so:: | 20 | since ``qemux86`` is an override. This applies to any use of override |
| 21 | syntax, so the following:: | ||
| 21 | 22 | ||
| 22 | SRC_URI_append = " file://somefile" | 23 | SRC_URI_append = " file://somefile" |
| 23 | SRC_URI_append_qemux86 = " file://somefile2" | 24 | SRC_URI_append_qemux86 = " file://somefile2" |
| @@ -29,7 +30,7 @@ since ``qemux86`` is an override. This applies to any use of override syntax so: | |||
| 29 | SRCREV_pn-bash = "abc" | 30 | SRCREV_pn-bash = "abc" |
| 30 | BB_TASK_NICE_LEVEL_task-testimage = '0' | 31 | BB_TASK_NICE_LEVEL_task-testimage = '0' |
| 31 | 32 | ||
| 32 | becomes:: | 33 | would now become:: |
| 33 | 34 | ||
| 34 | SRC_URI:append = " file://somefile" | 35 | SRC_URI:append = " file://somefile" |
| 35 | SRC_URI:append:qemux86 = " file://somefile2" | 36 | SRC_URI:append:qemux86 = " file://somefile2" |
| @@ -63,8 +64,8 @@ suffix to variables in ``layer.conf`` files such as :term:`BBFILE_PATTERN`, | |||
| 63 | may be the same as a :term:`DISTRO` override causing some confusion. We do | 64 | may be the same as a :term:`DISTRO` override causing some confusion. We do |
| 64 | plan to try and improve consistency as these issues are identified. | 65 | plan to try and improve consistency as these issues are identified. |
| 65 | 66 | ||
| 66 | To help with migration of layers there is a script in OE-Core. Once configured | 67 | To help with migration of layers, a script has been provided in OE-Core. |
| 67 | with the overrides used by a layer, this can be run as:: | 68 | Once configured with the overrides used by a layer, this can be run as:: |
| 68 | 69 | ||
| 69 | <oe-core>/scripts/contrib/convert-overrides.py <layerdir> | 70 | <oe-core>/scripts/contrib/convert-overrides.py <layerdir> |
| 70 | 71 | ||
| @@ -74,10 +75,13 @@ with the overrides used by a layer, this can be run as:: | |||
| 74 | expected to handle every case. In particular, it needs to be told which overrides | 75 | expected to handle every case. In particular, it needs to be told which overrides |
| 75 | the layer uses (usually machine and distro names/overrides) and the result should | 76 | the layer uses (usually machine and distro names/overrides) and the result should |
| 76 | be carefully checked since it can be a little enthusiastic and will convert | 77 | be carefully checked since it can be a little enthusiastic and will convert |
| 77 | references to ``_append``, ``_remove`` and ``_prepend`` in function and variables names. | 78 | references to ``_append``, ``_remove`` and ``_prepend`` in function and variable |
| 78 | 79 | names. | |
| 79 | For reference, this conversion is important as it allows BitBake to know what is | 80 | |
| 80 | an override and what is not. This should allow us to proceed with other syntax | 81 | For reference, this conversion is important as it allows BitBake to more reliably |
| 81 | improvements and simplifications for usability. It also means bitbake no longer | 82 | determine what is an override and what is not, as underscores are also used in |
| 82 | has to guess and maintain large lookup lists just in case ``functionname`` in | 83 | variable names without intending to be overrides. This should allow us to proceed |
| 83 | ``my_functionname`` is an override and this should improve efficiency. | 84 | with other syntax improvements and simplifications for usability. It also means |
| 85 | BitBake no longer has to guess and maintain large lookup lists just in case | ||
| 86 | e.g. ``functionname`` in ``my_functionname`` is an override, and thus should improve | ||
| 87 | efficiency. | ||
