* Re: [bitbake-devel] [RFC PATCH 4/3 v2] data_smart: remove old override syntax check
2024-09-24 9:09 ` [RFC PATCH 4/3 v2] data_smart: remove old override syntax check Konrad Weihmann
@ 2024-09-25 19:57 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2024-09-25 19:57 UTC (permalink / raw)
To: Konrad Weihmann; +Cc: bitbake-devel
Please send properly versioned and complete series, don't expect
maintainers to do your work and collected patches send a random times
with random versions.
On 24/09/2024 09:09:08+0000, Konrad Weihmann wrote:
> after the override syntax change is now out in the field for
> a longer time, the expensive check for the old syntax can be
> removed.
>
> This will save time while parsing, and should be side effect free,
> as variables in the old syntax are simply rendered into
> unapplicable variables.
>
> A more complete check (e.g. RDEPENDS_${PN} checks) could be implemented elsewhere. as part of a sanity check
>
> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
> ---
> lib/bb/data_smart.py | 9 ---------
> lib/bb/tests/parse.py | 35 -----------------------------------
> 2 files changed, 44 deletions(-)
>
> diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
> index 0523744de..fe4c50740 100644
> --- a/lib/bb/data_smart.py
> +++ b/lib/bb/data_smart.py
> @@ -539,15 +539,6 @@ class DataSmart(MutableMapping):
> return var in self.overridedata
>
> def setVar(self, var, value, **loginfo):
> - if not var.startswith("__anon_") and ("_append" in var or "_prepend" in var or "_remove" in var):
> - if re.search(r"(_append|_prepend|_remove)(_|$)", var) is not None:
> - info = "%s" % var
> - if "file" in loginfo:
> - info += " file: %s" % loginfo["file"]
> - if "line" in loginfo:
> - info += " line: %s" % loginfo["line"]
> - bb.fatal("Variable %s contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." % info)
> -
> shortvar = var.split(":", 1)[0]
> if shortvar in self._var_renames:
> _print_rename_error(shortvar, loginfo, self._var_renames, fullvar=var)
> diff --git a/lib/bb/tests/parse.py b/lib/bb/tests/parse.py
> index 2da3a2a22..6832952f8 100644
> --- a/lib/bb/tests/parse.py
> +++ b/lib/bb/tests/parse.py
> @@ -132,41 +132,6 @@ DESCRIPTION:${PN}-dev = "${DESCRIPTION} B"
> PN = "bc"
> """
>
> - override_old_append = """
> -EXTRA_OECONF_append = " c"
> -"""
> -
> - def test_parse_old_override_syntax_append(self):
> - f = self.parsehelper(self.override_old_append)
> - try:
> - bb.parse.handle(f.name, self.d)['']
> - self.fail('Pattern should have raised bb.BBHandledException')
> - except bb.BBHandledException:
> - pass
> -
> - override_old_prepend = """
> -EXTRA_OECONF_prepend = " c"
> -"""
> -
> - def test_parse_old_override_syntax_prepend(self):
> - f = self.parsehelper(self.override_old_prepend)
> - try:
> - bb.parse.handle(f.name, self.d)['']
> - self.fail('Pattern should have raised bb.BBHandledException')
> - except bb.BBHandledException:
> - pass
> -
> - override_old_remove = """
> -EXTRA_OECONF_remove = " c"
> -"""
> -
> - def test_parse_old_override_syntax_remove(self):
> - f = self.parsehelper(self.override_old_remove)
> - try:
> - bb.parse.handle(f.name, self.d)['']
> - self.fail('Pattern should have raised bb.BBHandledException')
> - except bb.BBHandledException:
> - pass
>
> override_old_valid_append = """
> do_appendsomething () {
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#16598): https://lists.openembedded.org/g/bitbake-devel/message/16598
> Mute This Topic: https://lists.openembedded.org/mt/108625078/3617179
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread