All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Konrad Weihmann <kweihmann@outlook.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [RFC PATCH 4/3 v2] data_smart: remove old override syntax check
Date: Wed, 25 Sep 2024 21:57:48 +0200	[thread overview]
Message-ID: <202409251957489e611f83@mail.local> (raw)
In-Reply-To: <GV1PR07MB912042E2A43F852836D065DBA8682@GV1PR07MB9120.eurprd07.prod.outlook.com>

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


      reply	other threads:[~2024-09-25 19:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240924090905.4097-1-kweihmann@outlook.com>
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202409251957489e611f83@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=kweihmann@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.