@@ -539,14 +539,14 @@ 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):
- 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)
+ 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:
when defining a function do_removesomething, the parser warned about Variable do_removesomething contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake correct it would be to search for a override operator at the end of the string or for the next operator. To avoid running the expensive regex search on every setVar call the current "cheap" check would be have to be triggered, before the more precise check is run. Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> --- lib/bb/data_smart.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)