Message ID | 20220304201150.418001-1-michael.opdenacker@bootlin.com |
---|---|
State | New |
Headers | show |
Series | bitbake-user-manual: further override syntax updates | expand |
Hi Michael, On 3/4/22 21:11, Michael Opdenacker via lists.openembedded.org wrote: > Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> > > --- > I think I found some missing updates for the overrides syntax, > but I'm not sure, so please review carefully! > --- > doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst > index 174cac78..b90e5cf0 100644 > --- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst > +++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst > @@ -511,7 +511,7 @@ variable. > .. note:: > > Overrides can only use lower-case characters. Additionally, > - underscores are not permitted in override names as they are used to > + colons are not permitted in override names as they are used to > separate overrides from each other and from the variable name. > I think we can now safely say that overrides can have underscores, dashes and digits in addition to lowercase characters? I don't know if a variable can start with an underscore, dash or digit but we do have x86_64 and qemux86-64 which are overrides AFAICT? This should show we properly support those "special" characters. Probably would be better in its own commit. Otherwise, for this commit: Reviewed-by: Quentin Schulz <foss+yocto@0leil.net> Thanks! Quentin
On Mon, 2022-03-07 at 10:37 +0100, Quentin Schulz wrote: > Hi Michael, > > On 3/4/22 21:11, Michael Opdenacker via lists.openembedded.org wrote: > > Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> > > > > --- > > I think I found some missing updates for the overrides syntax, > > but I'm not sure, so please review carefully! > > --- > > doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst > > index 174cac78..b90e5cf0 100644 > > --- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst > > +++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst > > @@ -511,7 +511,7 @@ variable. > > .. note:: > > > > Overrides can only use lower-case characters. Additionally, > > - underscores are not permitted in override names as they are used to > > + colons are not permitted in override names as they are used to > > separate overrides from each other and from the variable name. > > > > I think we can now safely say that overrides can have underscores, > dashes and digits in addition to lowercase characters? I don't know if a > variable can start with an underscore, dash or digit but we do have > x86_64 and qemux86-64 which are overrides AFAICT? This should show we > properly support those "special" characters. Probably would be better in > its own commit. > > Otherwise, for this commit: > > Reviewed-by: Quentin Schulz <foss+yocto@0leil.net> Thanks. It does look correct to me too. We do support digits in overrides and dashes. Underscores have a history of being painful and are the reason we have TRANSLATED_TARCH_ARCH: bitbake.conf:OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}${LIBCOVERRIDE}:forcevariable" bitbake.conf:FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" bitbake.conf:TRANSLATED_TARGET_ARCH ??= "${@d.getVar('TARGET_ARCH').replace("_", "-")}" although now we use ":" as the override character, we might be able to rethink that. Cheers, Richard
Hi Richard, On 3/7/22 10:49, Richard Purdie wrote: > On Mon, 2022-03-07 at 10:37 +0100, Quentin Schulz wrote: >> Hi Michael, >> >> On 3/4/22 21:11, Michael Opdenacker via lists.openembedded.org wrote: >>> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> >>> >>> --- >>> I think I found some missing updates for the overrides syntax, >>> but I'm not sure, so please review carefully! >>> --- >>> doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 8 ++++---- >>> 1 file changed, 4 insertions(+), 4 deletions(-) >>> >>> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst >>> index 174cac78..b90e5cf0 100644 >>> --- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst >>> +++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst >>> @@ -511,7 +511,7 @@ variable. >>> .. note:: >>> >>> Overrides can only use lower-case characters. Additionally, >>> - underscores are not permitted in override names as they are used to >>> + colons are not permitted in override names as they are used to >>> separate overrides from each other and from the variable name. >>> >> I think we can now safely say that overrides can have underscores, >> dashes and digits in addition to lowercase characters? I don't know if a >> variable can start with an underscore, dash or digit but we do have >> x86_64 and qemux86-64 which are overrides AFAICT? This should show we >> properly support those "special" characters. Probably would be better in >> its own commit. >> >> Otherwise, for this commit: >> >> Reviewed-by: Quentin Schulz <foss+yocto@0leil.net> > Thanks. It does look correct to me too. We do support digits in overrides and > dashes. Underscores have a history of being painful and are the reason we have > TRANSLATED_TARCH_ARCH: > > bitbake.conf:OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}${LIBCOVERRIDE}:forcevariable" > bitbake.conf:FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" > bitbake.conf:TRANSLATED_TARGET_ARCH ??= "${@d.getVar('TARGET_ARCH').replace("_", "-")}" > > although now we use ":" as the override character, we might be able to rethink that. Thanks for the review! So, can we say that an override can use lowercase characters and also digits and dashes (but not as a first character?)? Cheers Michael.
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst index 174cac78..b90e5cf0 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst @@ -511,7 +511,7 @@ variable. .. note:: Overrides can only use lower-case characters. Additionally, - underscores are not permitted in override names as they are used to + colons are not permitted in override names as they are used to separate overrides from each other and from the variable name. - *Selecting a Variable:* The :term:`OVERRIDES` variable is a @@ -523,8 +523,8 @@ variable. OVERRIDES = "architecture:os:machine" TEST = "default" - TEST_os = "osspecific" - TEST_nooverride = "othercondvalue" + TEST:os = "osspecific" + TEST:nooverride = "othercondvalue" In this example, the :term:`OVERRIDES` variable lists three overrides: "architecture", "os", and "machine". @@ -567,7 +567,7 @@ variable. - *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-configure = "val 1" FOO:task-compile = "val 2" In the
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> --- I think I found some missing updates for the overrides syntax, but I'm not sure, so please review carefully! --- doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)