mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
meta: Fix Deprecated warnings from regexs
Fix handling of escape characters in regexs and hence fix python Deprecation warnings which will be problematic in python 3.8. Note that some show up as: """ meta/classes/package.bbclass:1293: DeprecationWarning: invalid escape sequence \. """ where the problem isn't on 1293 in package.bbclass but in some _prepend to a package.bbclass function in a different file like mesa.inc, often from do_package_split() calls. (From OE-Core rev: 4b1c0c7d5525fc4cea9e0f02ec54e92a6fbc6199) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -326,7 +326,7 @@ def multiprocess_launch(target, items, d, extraargs=None):
|
||||
|
||||
def squashspaces(string):
|
||||
import re
|
||||
return re.sub("\s+", " ", string).strip()
|
||||
return re.sub(r"\s+", " ", string).strip()
|
||||
|
||||
def format_pkg_list(pkg_dict, ret_format=None):
|
||||
output = []
|
||||
@@ -374,7 +374,7 @@ def host_gcc_version(d, taskcontextonly=False):
|
||||
except subprocess.CalledProcessError as e:
|
||||
bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))
|
||||
|
||||
match = re.match(".* (\d\.\d)\.\d.*", output.split('\n')[0])
|
||||
match = re.match(r".* (\d\.\d)\.\d.*", output.split('\n')[0])
|
||||
if not match:
|
||||
bb.fatal("Can't get compiler version from %s --version output" % compiler)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user