From 4b1c0c7d5525fc4cea9e0f02ec54e92a6fbc6199 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 14 Jan 2019 15:49:50 +0000 Subject: meta: Fix Deprecated warnings from regexs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Richard Purdie --- meta/recipes-graphics/mesa/mesa.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta/recipes-graphics/mesa') diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 0cc0a82de4..06c47e6dd4 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -194,7 +194,7 @@ python mesa_populate_packages() { dri_pkgs = os.listdir(dri_drivers_root) lib_name = d.expand("${MLPREFIX}mesa-megadriver") for p in dri_pkgs: - m = re.match('^(.*)_dri\.so$', p) + m = re.match(r'^(.*)_dri\.so$', p) if m: pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1)) d.appendVar("RPROVIDES_%s" % lib_name, pkg_name) @@ -202,7 +202,7 @@ python mesa_populate_packages() { d.appendVar("RREPLACES_%s" % lib_name, pkg_name) pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe") - do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='') + do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='') } PACKAGESPLITFUNCS_prepend = "mesa_populate_packages " -- cgit 1.2.3-korg