* [PATCH 2/2] data_smart: restore the ability to use capital letters [not found] <20261007125138.59937-1-yann.dirson@vates.tech> @ 2026-10-07 12:51 ` Yann Dirson 2026-10-07 13:05 ` [PATCH 1/2] parse: add a (failing) test for a variable override with " Yann Dirson ` (2 subsequent siblings) 3 siblings, 0 replies; 12+ messages in thread From: Yann Dirson @ 2026-10-07 12:51 UTC (permalink / raw) To: bitbake-devel; +Cc: Yann Dirson [-- Attachment #1: Type: text/plain, Size: 1251 bytes --] This reverts commit 6eb56624e6d8dc1944e559b4f6584bfe66f566ba. That commit was meant as an ad-hoc band-aid when "_" was used as override prefix, and it explicitly blocked capital letters from being usable in the overrides. There is no reason to keep it now we use ":" as prefix. Signed-off-by: Yann Dirson <yann.dirson@vates.tech> --- lib/bb/data_smart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 8aa7c1f99..3c149239f 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -31,7 +31,7 @@ from bb.COW import COWDictBase logger = logging.getLogger("BitBake.Data") __setvar_keyword__ = [":append", ":prepend", ":remove"] -__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^A-Z]*))?$') +__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>.*))?$') __expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+}") __expand_python_regexp__ = re.compile(r"\${@(?:{.*?}|.)+?}") __whitespace_split__ = re.compile(r'(\s)') -- 2.47.3 -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] parse: add a (failing) test for a variable override with capital letters [not found] <20261007125138.59937-1-yann.dirson@vates.tech> 2026-10-07 12:51 ` [PATCH 2/2] data_smart: restore the ability to use capital letters Yann Dirson @ 2026-10-07 13:05 ` Yann Dirson 2026-10-12 8:39 ` [PATCH v2 0/2] capital letters in overrides Yann Dirson [not found] ` <20261012084202.103724-1-yann.dirson@vates.tech> 3 siblings, 0 replies; 12+ messages in thread From: Yann Dirson @ 2026-10-07 13:05 UTC (permalink / raw) To: bitbake-devel [-- Attachment #1: Type: text/plain, Size: 1891 bytes --] Both patches are meant for both master and 2.18. On 10/7/26 2:51 PM, Yann Dirson wrote: > Signed-off-by: Yann Dirson <yann.dirson@vates.tech> > --- > lib/bb/tests/parse.py | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/lib/bb/tests/parse.py b/lib/bb/tests/parse.py > index 6ac2137e0..9fc094b16 100644 > --- a/lib/bb/tests/parse.py > +++ b/lib/bb/tests/parse.py > @@ -150,6 +150,27 @@ exportD = "d" > self.assertEqual(d.getVar("exportD"), "d") > self.assertIsNone(d.getVarFlag("exportD", "export")) > > + mixedcase_pn_override = """ > +PN = "${@bb.parse.vars_from_file(d.getVar('FILE', False), d)[0]}" > +OVERRIDES = "pn-${PN}" > +RPROVIDES:perl-ExtUtils-MakeMaker = "base" > +RPROVIDES:perl-ExtUtils-MakeMaker:append:pn-ExtUtils-MakeMaker = " text" > +""" > + > + def test_parse_mixedcase_pn_override(self): > + # Recipes named after CPAN distributions have mixed-case PNs, so > + # OVERRIDES contains a mixed-case pn-${PN} entry. An operation > + # guarded by that override must still be applied. > + with tempfile.TemporaryDirectory() as tempdir: > + recipe = os.path.join(tempdir, "ExtUtils-MakeMaker.bb") > + with open(recipe, "w") as f: > + f.write(self.mixedcase_pn_override) > + os.chdir(tempdir) > + d = bb.parse.handle(recipe, self.d)[''] > + self.assertEqual(d.getVar("PN"), "ExtUtils-MakeMaker") > + self.assertIn("pn-ExtUtils-MakeMaker", d.getVar("OVERRIDES").split(":")) > + self.assertEqual(d.getVar("RPROVIDES:perl-ExtUtils-MakeMaker"), "base text") > + > overridetest = """ > RRECOMMENDS:${PN} = "a" > RRECOMMENDS:${PN}:libc = "b" -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 0/2] capital letters in overrides [not found] <20261007125138.59937-1-yann.dirson@vates.tech> 2026-10-07 12:51 ` [PATCH 2/2] data_smart: restore the ability to use capital letters Yann Dirson 2026-10-07 13:05 ` [PATCH 1/2] parse: add a (failing) test for a variable override with " Yann Dirson @ 2026-10-12 8:39 ` Yann Dirson [not found] ` <20261012084202.103724-1-yann.dirson@vates.tech> 3 siblings, 0 replies; 12+ messages in thread From: Yann Dirson @ 2026-10-12 8:39 UTC (permalink / raw) To: bitbake-devel; +Cc: Yann Dirson, docs [-- Attachment #1: Type: text/plain, Size: 474 bytes --] New in v2: - use @unittest.expectedFailure Yann Dirson (2): parse: add a (failing) test for a variable override with capital letters data_smart: restore the ability to use capital letters lib/bb/data_smart.py | 2 +- lib/bb/tests/parse.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) -- 2.47.3 -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <20261012084202.103724-1-yann.dirson@vates.tech>]
* [PATCH v2 1/2] parse: add a (failing) test for a variable override with capital letters [not found] ` <20261012084202.103724-1-yann.dirson@vates.tech> @ 2026-10-12 8:39 ` Yann Dirson 2026-10-12 8:39 ` [PATCH v2 2/2] data_smart: restore the ability to use " Yann Dirson ` (2 subsequent siblings) 3 siblings, 0 replies; 12+ messages in thread From: Yann Dirson @ 2026-10-12 8:39 UTC (permalink / raw) To: bitbake-devel; +Cc: Yann Dirson, docs [-- Attachment #1: Type: text/plain, Size: 1763 bytes --] Signed-off-by: Yann Dirson <yann.dirson@vates.tech> --- lib/bb/tests/parse.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/bb/tests/parse.py b/lib/bb/tests/parse.py index 6ac2137e0..7e7dbd923 100644 --- a/lib/bb/tests/parse.py +++ b/lib/bb/tests/parse.py @@ -150,6 +150,28 @@ exportD = "d" self.assertEqual(d.getVar("exportD"), "d") self.assertIsNone(d.getVarFlag("exportD", "export")) + mixedcase_pn_override = """ +PN = "${@bb.parse.vars_from_file(d.getVar('FILE', False), d)[0]}" +OVERRIDES = "pn-${PN}" +RPROVIDES:perl-ExtUtils-MakeMaker = "base" +RPROVIDES:perl-ExtUtils-MakeMaker:append:pn-ExtUtils-MakeMaker = " text" +""" + + @unittest.expectedFailure + def test_parse_mixedcase_pn_override(self): + # Recipes named after CPAN distributions have mixed-case PNs, so + # OVERRIDES contains a mixed-case pn-${PN} entry. An operation + # guarded by that override must still be applied. + with tempfile.TemporaryDirectory() as tempdir: + recipe = os.path.join(tempdir, "ExtUtils-MakeMaker.bb") + with open(recipe, "w") as f: + f.write(self.mixedcase_pn_override) + os.chdir(tempdir) + d = bb.parse.handle(recipe, self.d)[''] + self.assertEqual(d.getVar("PN"), "ExtUtils-MakeMaker") + self.assertIn("pn-ExtUtils-MakeMaker", d.getVar("OVERRIDES").split(":")) + self.assertEqual(d.getVar("RPROVIDES:perl-ExtUtils-MakeMaker"), "base text") + overridetest = """ RRECOMMENDS:${PN} = "a" RRECOMMENDS:${PN}:libc = "b" -- 2.47.3 -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/2] data_smart: restore the ability to use capital letters [not found] ` <20261012084202.103724-1-yann.dirson@vates.tech> 2026-10-12 8:39 ` [PATCH v2 1/2] parse: add a (failing) test for a variable override with capital letters Yann Dirson @ 2026-10-12 8:39 ` Yann Dirson 2026-10-13 5:17 ` [bitbake-devel] " Mathieu Dubois-Briand 2026-10-13 13:52 ` [PATCH v3 0/4] capital letters in overrides Yann Dirson [not found] ` <20261013135251.168428-1-yann.dirson@vates.tech> 3 siblings, 1 reply; 12+ messages in thread From: Yann Dirson @ 2026-10-12 8:39 UTC (permalink / raw) To: bitbake-devel; +Cc: Yann Dirson, docs [-- Attachment #1: Type: text/plain, Size: 1815 bytes --] This reverts commit 6eb56624e6d8dc1944e559b4f6584bfe66f566ba. That commit was meant as an ad-hoc band-aid when "_" was used as override prefix, and it explicitly blocked capital letters from being usable in the overrides. There is no reason to keep it now we use ":" as prefix. Signed-off-by: Yann Dirson <yann.dirson@vates.tech> --- lib/bb/data_smart.py | 2 +- lib/bb/tests/parse.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 8aa7c1f99..3c149239f 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -31,7 +31,7 @@ from bb.COW import COWDictBase logger = logging.getLogger("BitBake.Data") __setvar_keyword__ = [":append", ":prepend", ":remove"] -__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^A-Z]*))?$') +__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>.*))?$') __expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+}") __expand_python_regexp__ = re.compile(r"\${@(?:{.*?}|.)+?}") __whitespace_split__ = re.compile(r'(\s)') diff --git a/lib/bb/tests/parse.py b/lib/bb/tests/parse.py index 7e7dbd923..9fc094b16 100644 --- a/lib/bb/tests/parse.py +++ b/lib/bb/tests/parse.py @@ -157,7 +157,6 @@ RPROVIDES:perl-ExtUtils-MakeMaker = "base" RPROVIDES:perl-ExtUtils-MakeMaker:append:pn-ExtUtils-MakeMaker = " text" """ - @unittest.expectedFailure def test_parse_mixedcase_pn_override(self): # Recipes named after CPAN distributions have mixed-case PNs, so # OVERRIDES contains a mixed-case pn-${PN} entry. An operation -- 2.47.3 -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [bitbake-devel] [PATCH v2 2/2] data_smart: restore the ability to use capital letters 2026-10-12 8:39 ` [PATCH v2 2/2] data_smart: restore the ability to use " Yann Dirson @ 2026-10-13 5:17 ` Mathieu Dubois-Briand 2026-10-13 8:59 ` Yann Dirson 0 siblings, 1 reply; 12+ messages in thread From: Mathieu Dubois-Briand @ 2026-10-13 5:17 UTC (permalink / raw) To: yann.dirson, bitbake-devel; +Cc: docs On Mon Oct 12, 2026 at 10:39 AM CEST, Yann Dirson via lists.openembedded.org wrote: > This reverts commit 6eb56624e6d8dc1944e559b4f6584bfe66f566ba. > > That commit was meant as an ad-hoc band-aid when "_" was used as > override prefix, and it explicitly blocked capital letters from being > usable in the overrides. There is no reason to keep it now we use ":" > as prefix. > > Signed-off-by: Yann Dirson <yann.dirson@vates.tech> > --- Hi Yann, Thanks for the new version, but we are still seeing the same failure: FAIL: test_append_in_expanded_override (bb.tests.data.TestOverrides.test_append_in_expanded_override) ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/bitbake/lib/bb/tests/data.py", line 417, in test_append_in_expanded_override self.assertEqual(self.d.getVar("TEST"), "base appended") AssertionError: 'base' != 'base appended' - base + base appended https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/5075 https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/5043 https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/4856 Can you have a look at the issue? Thanks, Mathieu -- Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bitbake-devel] [PATCH v2 2/2] data_smart: restore the ability to use capital letters 2026-10-13 5:17 ` [bitbake-devel] " Mathieu Dubois-Briand @ 2026-10-13 8:59 ` Yann Dirson 0 siblings, 0 replies; 12+ messages in thread From: Yann Dirson @ 2026-10-13 8:59 UTC (permalink / raw) To: Mathieu Dubois-Briand, bitbake-devel; +Cc: docs [-- Attachment #1: Type: text/plain, Size: 2486 bytes --] On 10/13/26 7:17 AM, Mathieu Dubois-Briand wrote: > On Mon Oct 12, 2026 at 10:39 AM CEST, Yann Dirson via lists.openembedded.org wrote: >> This reverts commit 6eb56624e6d8dc1944e559b4f6584bfe66f566ba. >> >> That commit was meant as an ad-hoc band-aid when "_" was used as >> override prefix, and it explicitly blocked capital letters from being >> usable in the overrides. There is no reason to keep it now we use ":" >> as prefix. >> >> Signed-off-by: Yann Dirson <yann.dirson@vates.tech> >> --- > > Hi Yann, > > Thanks for the new version, but we are still seeing the same failure: > > FAIL: test_append_in_expanded_override (bb.tests.data.TestOverrides.test_append_in_expanded_override) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/bitbake/lib/bb/tests/data.py", line 417, in test_append_in_expanded_override > self.assertEqual(self.d.getVar("TEST"), "base appended") > AssertionError: 'base' != 'base appended' > - base > + base appended > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/5075 > https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/5043 > https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/4856 Wow, that's funky. Getting the same sha1 tested in the autobuilder I don't see any failure, do I have anything special to do to reproduce how the autobuilder tests things? $ git fetch origin 83afc355141f2451058f505f18be4b95486ec050 ... From https://git.openembedded.org/bitbake * branch 83afc355141f2451058f505f18be4b95486ec050 -> FETCH_HEAD $ git checkout FETCH_HEAD ... HEAD is now at 83afc3551 data_smart: restore the ability to use capital letters $ ./bin/bitbake-selftest bb.tests.parse.ParseTest.test_parse_mixedcase_pn_override . ---------------------------------------------------------------------- Ran 1 test in 0.001s OK $ git checkout HEAD^ ... HEAD is now at 6e7bdd494 parse: add a (failing) test for a variable override with capital letters $ ./bin/bitbake-selftest bb.tests.parse.ParseTest.test_parse_mixedcase_pn_override x ---------------------------------------------------------------------- Ran 1 test in 0.002s OK (expected failures=1) -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 0/4] capital letters in overrides [not found] ` <20261012084202.103724-1-yann.dirson@vates.tech> 2026-10-12 8:39 ` [PATCH v2 1/2] parse: add a (failing) test for a variable override with capital letters Yann Dirson 2026-10-12 8:39 ` [PATCH v2 2/2] data_smart: restore the ability to use " Yann Dirson @ 2026-10-13 13:52 ` Yann Dirson [not found] ` <20261013135251.168428-1-yann.dirson@vates.tech> 3 siblings, 0 replies; 12+ messages in thread From: Yann Dirson @ 2026-10-13 13:52 UTC (permalink / raw) To: bitbake-devel; +Cc: Yann Dirson, docs [-- Attachment #1: Type: text/plain, Size: 832 bytes --] New in v3: - add a test showing non-expansion of lowercase variable in override - fix that, which also fixes the regression observed in v2 New in v2: - use @unittest.expectedFailure Yann Dirson (4): data: add a (failing) test showing non-expansion of lowercase variable in override data_smart: differ taking overrides with unexpanded variables into account parse: add a (failing) test for a variable override with capital letters data_smart: restore the ability to use capital letters lib/bb/data_smart.py | 2 +- lib/bb/tests/data.py | 10 ++++++++++ lib/bb/tests/parse.py | 21 +++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) -- 2.47.3 -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <20261013135251.168428-1-yann.dirson@vates.tech>]
* [PATCH v3 1/4] data: add a (failing) test showing non-expansion of lowercase variable in override [not found] ` <20261013135251.168428-1-yann.dirson@vates.tech> @ 2026-10-13 13:52 ` Yann Dirson 2026-10-13 13:52 ` [PATCH v3 2/4] data_smart: differ taking overrides with unexpanded variables into account Yann Dirson ` (2 subsequent siblings) 3 siblings, 0 replies; 12+ messages in thread From: Yann Dirson @ 2026-10-13 13:52 UTC (permalink / raw) To: bitbake-devel; +Cc: Yann Dirson, docs [-- Attachment #1: Type: text/plain, Size: 1415 bytes --] This is a minor variation of the test_append_in_expanded_override test. Signed-off-by: Yann Dirson <yann.dirson@vates.tech> --- lib/bb/tests/data.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/bb/tests/data.py b/lib/bb/tests/data.py index 491774747..31a1ec323 100644 --- a/lib/bb/tests/data.py +++ b/lib/bb/tests/data.py @@ -416,6 +416,17 @@ class TestOverrides(unittest.TestCase): bb.data.expandKeys(self.d) self.assertEqual(self.d.getVar("TEST"), "base appended") + # Test an :append whose override name is lowercase + @unittest.expectedFailure + def test_append_in_expanded_lowercase_override(self): + self.d.setVar("machine", "qemux86") + self.d.setVar("PN", "gizmo") + self.d.setVar("OVERRIDES", "gizmo:pn-gizmo-qemux86") + self.d.setVar("TEST:${PN}", "base") + self.d.setVar("TEST:${PN}:append:pn-gizmo-${machine}", " appended") + bb.data.expandKeys(self.d) + self.assertEqual(self.d.getVar("TEST"), "base appended") + # Test renaming to a key which is itself not expanded yet, as native.bbclass # does. The dependent override keys must be left for expandKeys() to rename. def test_rename_to_unexpanded_key_with_override(self): -- 2.47.3 -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 2/4] data_smart: differ taking overrides with unexpanded variables into account [not found] ` <20261013135251.168428-1-yann.dirson@vates.tech> 2026-10-13 13:52 ` [PATCH v3 1/4] data: add a (failing) test showing non-expansion of lowercase variable in override Yann Dirson @ 2026-10-13 13:52 ` Yann Dirson 2026-10-13 13:52 ` [PATCH v3 3/4] parse: add a (failing) test for a variable override with capital letters Yann Dirson 2026-10-13 13:52 ` [PATCH v3 4/4] data_smart: restore the ability to use " Yann Dirson 3 siblings, 0 replies; 12+ messages in thread From: Yann Dirson @ 2026-10-13 13:52 UTC (permalink / raw) To: bitbake-devel; +Cc: Yann Dirson, docs [-- Attachment #1: Type: text/plain, Size: 2120 bytes --] In original code, in a setVar call for, say, "TEST:foo-${MACHINE}", the __setvar_regexp__ regexp does not match *because of capitals*, so it stores a variable name including $ and caps. Later during finalization expandKeys then calls renameVar and setVar, at which point the regexp matches and the override is detected. The reason why this works is not because there is a variable in the override text, but because there are uppercase letters, so it would break with lowercase, as well as if we want to change the regexp to allow uppercase in an override string. Signed-off-by: Yann Dirson <yann.dirson@vates.tech> Assisted-by: Claude Opus 5.5 --- lib/bb/data_smart.py | 2 +- lib/bb/tests/data.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 8aa7c1f99..a6e4bddb6 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -31,7 +31,7 @@ from bb.COW import COWDictBase logger = logging.getLogger("BitBake.Data") __setvar_keyword__ = [":append", ":prepend", ":remove"] -__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^A-Z]*))?$') +__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^A-Z$]*))?$') __expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+}") __expand_python_regexp__ = re.compile(r"\${@(?:{.*?}|.)+?}") __whitespace_split__ = re.compile(r'(\s)') diff --git a/lib/bb/tests/data.py b/lib/bb/tests/data.py index 31a1ec323..fb455be98 100644 --- a/lib/bb/tests/data.py +++ b/lib/bb/tests/data.py @@ -417,7 +417,6 @@ class TestOverrides(unittest.TestCase): self.assertEqual(self.d.getVar("TEST"), "base appended") # Test an :append whose override name is lowercase - @unittest.expectedFailure def test_append_in_expanded_lowercase_override(self): self.d.setVar("machine", "qemux86") self.d.setVar("PN", "gizmo") -- 2.47.3 -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 3/4] parse: add a (failing) test for a variable override with capital letters [not found] ` <20261013135251.168428-1-yann.dirson@vates.tech> 2026-10-13 13:52 ` [PATCH v3 1/4] data: add a (failing) test showing non-expansion of lowercase variable in override Yann Dirson 2026-10-13 13:52 ` [PATCH v3 2/4] data_smart: differ taking overrides with unexpanded variables into account Yann Dirson @ 2026-10-13 13:52 ` Yann Dirson 2026-10-13 13:52 ` [PATCH v3 4/4] data_smart: restore the ability to use " Yann Dirson 3 siblings, 0 replies; 12+ messages in thread From: Yann Dirson @ 2026-10-13 13:52 UTC (permalink / raw) To: bitbake-devel; +Cc: Yann Dirson, docs [-- Attachment #1: Type: text/plain, Size: 1763 bytes --] Signed-off-by: Yann Dirson <yann.dirson@vates.tech> --- lib/bb/tests/parse.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/bb/tests/parse.py b/lib/bb/tests/parse.py index 6ac2137e0..7e7dbd923 100644 --- a/lib/bb/tests/parse.py +++ b/lib/bb/tests/parse.py @@ -150,6 +150,28 @@ exportD = "d" self.assertEqual(d.getVar("exportD"), "d") self.assertIsNone(d.getVarFlag("exportD", "export")) + mixedcase_pn_override = """ +PN = "${@bb.parse.vars_from_file(d.getVar('FILE', False), d)[0]}" +OVERRIDES = "pn-${PN}" +RPROVIDES:perl-ExtUtils-MakeMaker = "base" +RPROVIDES:perl-ExtUtils-MakeMaker:append:pn-ExtUtils-MakeMaker = " text" +""" + + @unittest.expectedFailure + def test_parse_mixedcase_pn_override(self): + # Recipes named after CPAN distributions have mixed-case PNs, so + # OVERRIDES contains a mixed-case pn-${PN} entry. An operation + # guarded by that override must still be applied. + with tempfile.TemporaryDirectory() as tempdir: + recipe = os.path.join(tempdir, "ExtUtils-MakeMaker.bb") + with open(recipe, "w") as f: + f.write(self.mixedcase_pn_override) + os.chdir(tempdir) + d = bb.parse.handle(recipe, self.d)[''] + self.assertEqual(d.getVar("PN"), "ExtUtils-MakeMaker") + self.assertIn("pn-ExtUtils-MakeMaker", d.getVar("OVERRIDES").split(":")) + self.assertEqual(d.getVar("RPROVIDES:perl-ExtUtils-MakeMaker"), "base text") + overridetest = """ RRECOMMENDS:${PN} = "a" RRECOMMENDS:${PN}:libc = "b" -- 2.47.3 -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 4/4] data_smart: restore the ability to use capital letters [not found] ` <20261013135251.168428-1-yann.dirson@vates.tech> ` (2 preceding siblings ...) 2026-10-13 13:52 ` [PATCH v3 3/4] parse: add a (failing) test for a variable override with capital letters Yann Dirson @ 2026-10-13 13:52 ` Yann Dirson 3 siblings, 0 replies; 12+ messages in thread From: Yann Dirson @ 2026-10-13 13:52 UTC (permalink / raw) To: bitbake-devel; +Cc: Yann Dirson, docs [-- Attachment #1: Type: text/plain, Size: 1819 bytes --] This reverts commit 6eb56624e6d8dc1944e559b4f6584bfe66f566ba. That commit was meant as an ad-hoc band-aid when "_" was used as override prefix, and it explicitly blocked capital letters from being usable in the overrides. There is no reason to keep it now we use ":" as prefix. Signed-off-by: Yann Dirson <yann.dirson@vates.tech> --- lib/bb/data_smart.py | 2 +- lib/bb/tests/parse.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index a6e4bddb6..a95c08425 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -31,7 +31,7 @@ from bb.COW import COWDictBase logger = logging.getLogger("BitBake.Data") __setvar_keyword__ = [":append", ":prepend", ":remove"] -__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^A-Z$]*))?$') +__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^$]*))?$') __expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+}") __expand_python_regexp__ = re.compile(r"\${@(?:{.*?}|.)+?}") __whitespace_split__ = re.compile(r'(\s)') diff --git a/lib/bb/tests/parse.py b/lib/bb/tests/parse.py index 7e7dbd923..9fc094b16 100644 --- a/lib/bb/tests/parse.py +++ b/lib/bb/tests/parse.py @@ -157,7 +157,6 @@ RPROVIDES:perl-ExtUtils-MakeMaker = "base" RPROVIDES:perl-ExtUtils-MakeMaker:append:pn-ExtUtils-MakeMaker = " text" """ - @unittest.expectedFailure def test_parse_mixedcase_pn_override(self): # Recipes named after CPAN distributions have mixed-case PNs, so # OVERRIDES contains a mixed-case pn-${PN} entry. An operation -- 2.47.3 -- Yann Dirson | Vates Platform Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-10-13 13:53 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261007125138.59937-1-yann.dirson@vates.tech>
2026-10-07 12:51 ` [PATCH 2/2] data_smart: restore the ability to use capital letters Yann Dirson
2026-10-07 13:05 ` [PATCH 1/2] parse: add a (failing) test for a variable override with " Yann Dirson
2026-10-12 8:39 ` [PATCH v2 0/2] capital letters in overrides Yann Dirson
[not found] ` <20261012084202.103724-1-yann.dirson@vates.tech>
2026-10-12 8:39 ` [PATCH v2 1/2] parse: add a (failing) test for a variable override with capital letters Yann Dirson
2026-10-12 8:39 ` [PATCH v2 2/2] data_smart: restore the ability to use " Yann Dirson
2026-10-13 5:17 ` [bitbake-devel] " Mathieu Dubois-Briand
2026-10-13 8:59 ` Yann Dirson
2026-10-13 13:52 ` [PATCH v3 0/4] capital letters in overrides Yann Dirson
[not found] ` <20261013135251.168428-1-yann.dirson@vates.tech>
2026-10-13 13:52 ` [PATCH v3 1/4] data: add a (failing) test showing non-expansion of lowercase variable in override Yann Dirson
2026-10-13 13:52 ` [PATCH v3 2/4] data_smart: differ taking overrides with unexpanded variables into account Yann Dirson
2026-10-13 13:52 ` [PATCH v3 3/4] parse: add a (failing) test for a variable override with capital letters Yann Dirson
2026-10-13 13:52 ` [PATCH v3 4/4] data_smart: restore the ability to use " Yann Dirson
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.