Skip to contentSkip to conversation

migration-guides: Add start of 3.4 guide with override migration notes

PATCH In review Richard Purdie 3 participants 3 messages Jul 29, 2021 – Jul 30, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 migration-guides: Add start of 3.4 guide with override migration notes

---
 documentation/migration-guides/index.rst      |  1 +
 .../migration-guides/migration-3.4.rst        | 72 +++++++++++++++++++
 2 files changed, 73 insertions(+)
 create mode 100644 documentation/migration-guides/migration-3.4.rst
documentation/migration-guides/index.rst +1 -0
index 6304e6318..287b55319 100644
@@ -12,6 +12,7 @@ to move to one release of the Yocto Project from the previous one.
 .. toctree::
 
    migration-general
+   migration-3.4
    migration-3.3
    migration-3.2
    migration-3.1
documentation/migration-guides/migration-3.4.rst new file +72 -0

72 lines not on this page · raw message

Signature · 1 line
2.30.2
#1 lore raw

Hi Richard,

Quoted 34 lines · Richard Purdie
---
 documentation/migration-guides/index.rst      |  1 +
 .../migration-guides/migration-3.4.rst        | 72 +++++++++++++++++++
 2 files changed, 73 insertions(+)
 create mode 100644 documentation/migration-guides/migration-3.4.rst
documentation/migration-guides/index.rst +1 -0
index 6304e6318..287b55319 100644
@@ -12,6 +12,7 @@ to move to one release of the Yocto Project from the previous one.
 .. toctree::
 
    migration-general
+   migration-3.4
    migration-3.3
    migration-3.2
    migration-3.1
documentation/migration-guides/migration-3.4.rst new file +9 -0
new file mode 100644
index 000000000..45ce38cd6
@@ -0,0 +1,72 @@
+Release 3.4 (honister)
+======================
+
+This section provides migration information for moving to the Yocto
+Project 3.4 Release (codename "honister") from the prior release.
+
+Override syntax changes
+-----------------------
+

documentation/migration-guides/migration-3.4.rst line 19

Quoted 10 lines
documentation/migration-guides/migration-3.4.rst new file +10 -0
+This release requires changes to the metadata to indicate where overrides are
+being used in variable key names. This is done with the ":" character replacing
+the use of "_" previously. This means that an entry like::
+
+   SRC_URI_qemux86 = "file://somefile"
+
+becomes::
+
+   SRC_URI:qemux86 = " file://somefile"
+

Is the leading space here on purpose?

documentation/migration-guides/migration-3.4.rst line 21

Quoted 2 lines
documentation/migration-guides/migration-3.4.rst new file +2 -0
+since qemux86 is an override. This applies to any use of override syntax so::
+

I'm pondering whether we should quote or tick quote qemux86?

documentation/migration-guides/migration-3.4.rst line 28

Quoted 7 lines
documentation/migration-guides/migration-3.4.rst new file +7 -0
+   SRC_URI_append = " file://somefile"
+   SRC_URI_append_qemux86 = " file://somefile2"
+   SRC_URI_remove_qemux86-64 = " file://somefile3"
+   SRC_URI_prepend_qemuarm = "file://somefile4 "
+   FILES_${PN}-ptest = "${bindir}/xyz"
+   IMAGE_CMD_tar = "tar"
+   BASE_LIB_tune-coretexa76 = "lib"

s/BASE_LIB_tune-coretexa76/BASE_LIB_tune-cortexa76/

documentation/migration-guides/migration-3.4.rst line 40

Quoted 12 lines
documentation/migration-guides/migration-3.4.rst new file +12 -0
+   SRCREV_pn-bash = "abc"
+   BB_TASK_NICE_LEVEL_task-testimage = '0'
+
+becomes::
+
+   SRC_URI:append = " file://somefile"
+   SRC_URI:append:qemux86 = " file://somefile2"
+   SRC_URI:remove:qemux86-64 = " file://somefile3"
+   SRC_URI:prepend:qemuarm = "file://somefile4 "
+   FILES:${PN}-ptest = "${bindir}/xyz"
+   IMAGE_CMD:tar = "tar"
+   BASE_LIB:tune-coretexa76 = "lib"

s/BASE_LIB:tune-coretexa76/BASE_LIB:tune-cortexa76/

documentation/migration-guides/migration-3.4.rst line 46

Quoted 6 lines
documentation/migration-guides/migration-3.4.rst new file +6 -0
+   SRCREV:pn-bash = "abc"
+   BB_TASK_NICE_LEVEL:task-testimage = '0'
+
+This also applies to variable queries to the datastore, for example using getVar 
+and similar so d.getVar("RDEPENDS_${PN}") becomes d.getVar("RDEPENDS:${PN}").
+

Probably would benefit from tick quotes?

documentation/migration-guides/migration-3.4.rst line 47

Quoted 1 line
documentation/migration-guides/migration-3.4.rst new file +1 -0
+Whilst some of these are fairly obvious such as MACHINE and DISTRO overrides, some

s/MACHINE/:term:MACHINE/

Ditto for DISTRO.

documentation/migration-guides/migration-3.4.rst line 48

Quoted 1 line
documentation/migration-guides/migration-3.4.rst new file +1 -0
+are less obvious, for example the packaging variables such as RDEPENDS, FILES and 

Ditto for RDEPENDS and FILES.

documentation/migration-guides/migration-3.4.rst line 49

Quoted 1 line
documentation/migration-guides/migration-3.4.rst new file +1 -0
+so on taking package names (e.g. ${PN}, ${PN}-ptest) as overrides. These overrides 

Tick quotes for ${PN}?

documentation/migration-guides/migration-3.4.rst line 50

Quoted 1 line
documentation/migration-guides/migration-3.4.rst new file +1 -0
+are not always applies in OVERRIDES but applied conditionally in specific contexts

s/OVERRIDES/:term:OVERRIDES/

s/applies// ?

documentation/migration-guides/migration-3.4.rst line 51

Quoted 1 line
documentation/migration-guides/migration-3.4.rst new file +1 -0
+such as packaging. The task-<taskname> is another context specific override, the 

Tick quoting task-<taskname>?

documentation/migration-guides/migration-3.4.rst line 52

Quoted 1 line
documentation/migration-guides/migration-3.4.rst new file +1 -0
+context being specific tasks in that case. Tune overrides are another specialist

s/specialist/special/ ?

documentation/migration-guides/migration-3.4.rst line 56

Quoted 4 lines
documentation/migration-guides/migration-3.4.rst new file +4 -0
+case where some code does use them as overrides but some does not. We plan to try
+and make the tune code use overrides more consistently in the future.
+
+To help with migration of layers there is a script in OE-Core. Once configured

Add a link to this script whose text is "a script in OE-Core"? (I know it's mentioned below).

documentation/migration-guides/migration-3.4.rst line 66

Quoted 10 lines
documentation/migration-guides/migration-3.4.rst new file +10 -0
+with the overrides used by a layer, this can be run as::
+
+   <oe-core>/scripts/contrib/convert-overrides.py <layerdir>
+
+Please read the notes in the script as it isn't entirely automatic and it isn't
+expected to handle every case. In particular, it needs to be told which overrides
+the layer uses (usually machine and distro names/overrides) and the result should
+be carefully checked since it can be a little enthusiastic and will convert
+references to "_append", "_remove" and "_prepend" in function and variables names.
+

Pondering whether the one (or two) paragpraphs above should be in a ..note section to highlight it.

documentation/migration-guides/migration-3.4.rst line 72

Quoted 6 lines
documentation/migration-guides/migration-3.4.rst new file +6 -0
+For reference, this conversion is important as it allows bitbake to know what is
+an override and what is not. This should allow us to proceed with other syntax
+improvements and simplifications for usability. It also means bitbake no longer
+has to guess and maintain large lookup lists just in case "functionname" in
+"my_functionname" is an override and this should improve efficiency.
+

Thanks for the patch :)

Cheers,
Quentin

#2 lore raw

Richard, thanks for the patch
Quentin, thanks for the review

I'm taking care of preparing a V2 to reduce the load on Richard's shoulders...

Quoted 40 lines · Quentin Schulz

Hi Richard,

Quoted 37 lines · Richard Purdie
---
 documentation/migration-guides/index.rst      |  1 +
 .../migration-guides/migration-3.4.rst        | 72 +++++++++++++++++++
 2 files changed, 73 insertions(+)
 create mode 100644 documentation/migration-guides/migration-3.4.rst
documentation/migration-guides/index.rst +1 -0
index 6304e6318..287b55319 100644
@@ -12,6 +12,7 @@ to move to one release of the Yocto Project from the previous one.
 .. toctree::
 
    migration-general
+   migration-3.4
    migration-3.3
    migration-3.2
    migration-3.1
documentation/migration-guides/migration-3.4.rst new file +12 -0
new file mode 100644
index 000000000..45ce38cd6
@@ -0,0 +1,72 @@
+Release 3.4 (honister)
+======================
+
+This section provides migration information for moving to the Yocto
+Project 3.4 Release (codename "honister") from the prior release.
+
+Override syntax changes
+-----------------------
+
+This release requires changes to the metadata to indicate where overrides are
+being used in variable key names. This is done with the ":" character replacing
+the use of "_" previously. This means that an entry like::
Quoted 8 lines

documentation/migration-guides/migration-3.4.rst line 19

Quoted 7 lines
documentation/migration-guides/migration-3.4.rst new file +7 -0
+
+   SRC_URI_qemux86 = "file://somefile"
+
+becomes::
+
+   SRC_URI:qemux86 = " file://somefile"
+

Is the leading space here on purpose?

Assuming that's a typo. Fixed.

Quoted 4 lines

documentation/migration-guides/migration-3.4.rst line 21

Quoted 3 lines
documentation/migration-guides/migration-3.4.rst new file +2 -0
+since qemux86 is an override. This applies to any use of override syntax so::
+

I'm pondering whether we should quote or tick quote qemux86?

I'll set it to ``qemux86`` but I plan to write some documentation coding style so that we know which conventions to follow.

Quoted 9 lines

documentation/migration-guides/migration-3.4.rst line 28

Quoted 8 lines
documentation/migration-guides/migration-3.4.rst new file +7 -0
+   SRC_URI_append = " file://somefile"
+   SRC_URI_append_qemux86 = " file://somefile2"
+   SRC_URI_remove_qemux86-64 = " file://somefile3"
+   SRC_URI_prepend_qemuarm = "file://somefile4 "
+   FILES_${PN}-ptest = "${bindir}/xyz"
+   IMAGE_CMD_tar = "tar"
+   BASE_LIB_tune-coretexa76 = "lib"

s/BASE_LIB_tune-coretexa76/BASE_LIB_tune-cortexa76/

Fixed.

Quoted 7 lines

documentation/migration-guides/migration-3.4.rst line 46

Quoted 6 lines
documentation/migration-guides/migration-3.4.rst new file +6 -0
+   SRCREV:pn-bash = "abc"
+   BB_TASK_NICE_LEVEL:task-testimage = '0'
+
+This also applies to variable queries to the datastore, for example using getVar 
+and similar so d.getVar("RDEPENDS_${PN}") becomes d.getVar("RDEPENDS:${PN}").
+

Probably would benefit from tick quotes?

Done

Quoted 8 lines

documentation/migration-guides/migration-3.4.rst line 47

Quoted 2 lines
documentation/migration-guides/migration-3.4.rst new file +1 -0
+Whilst some of these are fairly obvious such as MACHINE and DISTRO overrides, some

s/MACHINE/:term:MACHINE/

Ditto for DISTRO.

documentation/migration-guides/migration-3.4.rst line 48

Quoted 1 line
documentation/migration-guides/migration-3.4.rst new file +1 -0
+are less obvious, for example the packaging variables such as RDEPENDS, FILES and 

Ditto for RDEPENDS and FILES.

Fixed

Quoted 6 lines

documentation/migration-guides/migration-3.4.rst line 49

Quoted 2 lines
documentation/migration-guides/migration-3.4.rst new file +1 -0
+so on taking package names (e.g. ${PN}, ${PN}-ptest) as overrides. These overrides 

Tick quotes for ${PN}?

documentation/migration-guides/migration-3.4.rst line 50

Quoted 1 line
documentation/migration-guides/migration-3.4.rst new file +1 -0
+are not always applies in OVERRIDES but applied conditionally in specific contexts

s/OVERRIDES/:term:OVERRIDES/

All fixed!

Quoted 2 lines

s/applies// ?

I first felt like writing "applied" instead, but this makes sense too. The sentence is now:

"These overrides are not always in
:term:OVERRIDES but applied conditionally in specific contexts such as packaging"

Quoted 3 lines

documentation/migration-guides/migration-3.4.rst line 51

Quoted 2 lines
documentation/migration-guides/migration-3.4.rst new file +1 -0
+such as packaging. The task-<taskname> is another context specific override, the 

Tick quoting task-<taskname>?

Yes

Quoted 3 lines

documentation/migration-guides/migration-3.4.rst line 52

Quoted 2 lines
documentation/migration-guides/migration-3.4.rst new file +1 -0
+context being specific tasks in that case. Tune overrides are another specialist

s/specialist/special/ ?

Make sense

Quoted 11 lines

documentation/migration-guides/migration-3.4.rst line 56

Quoted 5 lines
documentation/migration-guides/migration-3.4.rst new file +4 -0
+case where some code does use them as overrides but some does not. We plan to try
+and make the tune code use overrides more consistently in the future.
+
+To help with migration of layers there is a script in OE-Core. Once configured

Add a link to this script whose text is "a script in OE-Core"? (I know it's mentioned below).

documentation/migration-guides/migration-3.4.rst line 59

Quoted 3 lines
documentation/migration-guides/migration-3.4.rst new file +3 -0
+with the overrides used by a layer, this can be run as::
+
+   <oe-core>/scripts/contrib/convert-overrides.py <layerdir>

I'm not sure about what you're proposing here. I believe we currently don't put hyperlinks to source code in the documentation, we just mention the file paths. We could though.

Quoted 9 lines

documentation/migration-guides/migration-3.4.rst line 66

Quoted 7 lines
documentation/migration-guides/migration-3.4.rst new file +7 -0
+
+Please read the notes in the script as it isn't entirely automatic and it isn't
+expected to handle every case. In particular, it needs to be told which overrides
+the layer uses (usually machine and distro names/overrides) and the result should
+be carefully checked since it can be a little enthusiastic and will convert
+references to "_append", "_remove" and "_prepend" in function and variables names.
+

Pondering whether the one (or two) paragpraphs above should be in a ..note section to highlight it.

Good idea, I put the first paragraph in a note. I didn't want the second paragraph to be in the same note. This way it's more visible IMHO.

I'll submit my V2 soon.

Thanks again,

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com