All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bitbake-user-manual: further override syntax updates
@ 2022-03-04 20:11 Michael Opdenacker
  2022-03-07  9:37 ` [bitbake-devel] " Quentin Schulz
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Opdenacker @ 2022-03-04 20:11 UTC (permalink / raw)
  To: bitbake-devel; +Cc: docs, Michael Opdenacker

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.
 
 -  *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
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [bitbake-devel] [PATCH] bitbake-user-manual: further override syntax updates
  2022-03-04 20:11 [PATCH] bitbake-user-manual: further override syntax updates Michael Opdenacker
@ 2022-03-07  9:37 ` Quentin Schulz
  2022-03-07  9:49   ` [docs] " Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Quentin Schulz @ 2022-03-07  9:37 UTC (permalink / raw)
  To: michael.opdenacker, bitbake-devel; +Cc: docs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [docs] [bitbake-devel] [PATCH] bitbake-user-manual: further override syntax updates
  2022-03-07  9:37 ` [bitbake-devel] " Quentin Schulz
@ 2022-03-07  9:49   ` Richard Purdie
  2022-03-07 10:03     ` Michael Opdenacker
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2022-03-07  9:49 UTC (permalink / raw)
  To: Quentin Schulz, michael.opdenacker, bitbake-devel; +Cc: docs

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [docs] [bitbake-devel] [PATCH] bitbake-user-manual: further override syntax updates
  2022-03-07  9:49   ` [docs] " Richard Purdie
@ 2022-03-07 10:03     ` Michael Opdenacker
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Opdenacker @ 2022-03-07 10:03 UTC (permalink / raw)
  To: Richard Purdie, Quentin Schulz, bitbake-devel; +Cc: docs

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.

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-07 10:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 20:11 [PATCH] bitbake-user-manual: further override syntax updates Michael Opdenacker
2022-03-07  9:37 ` [bitbake-devel] " Quentin Schulz
2022-03-07  9:49   ` [docs] " Richard Purdie
2022-03-07 10:03     ` Michael Opdenacker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.