From cd4b8a8553f9d551af27941910cf4d3405ecb7b0 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. (From OE-Core rev: 4b1c0c7d5525fc4cea9e0f02ec54e92a6fbc6199) Signed-off-by: Richard Purdie --- meta/recipes-devtools/llvm/llvm_git.bb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'meta/recipes-devtools/llvm/llvm_git.bb') diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb index 727876303d..eb0779d6ec 100644 --- a/meta/recipes-devtools/llvm/llvm_git.bb +++ b/meta/recipes-devtools/llvm/llvm_git.bb @@ -34,13 +34,13 @@ LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install" def get_llvm_arch(bb, d, arch_var): import re a = d.getVar(arch_var) - if re.match('(i.86|athlon|x86.64)$', a): return 'X86' - elif re.match('arm$', a): return 'ARM' - elif re.match('armeb$', a): return 'ARM' - elif re.match('aarch64$', a): return 'AArch64' - elif re.match('aarch64_be$', a): return 'AArch64' - elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips' - elif re.match('p(pc|owerpc)(|64)', a): return 'PowerPC' + if re.match(r'(i.86|athlon|x86.64)$', a): return 'X86' + elif re.match(r'arm$', a): return 'ARM' + elif re.match(r'armeb$', a): return 'ARM' + elif re.match(r'aarch64$', a): return 'AArch64' + elif re.match(r'aarch64_be$', a): return 'AArch64' + elif re.match(r'mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips' + elif re.match(r'p(pc|owerpc)(|64)', a): return 'PowerPC' else: raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a) @@ -172,9 +172,9 @@ INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm += "dev-so" python llvm_populate_packages() { libdir = bb.data.expand('${libdir}', d) libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d) - split_dbg_packages = do_split_packages(d, libllvm_libdir+'/.debug', '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s-dbg', 'Split debug package for %s', allow_dirs=True) - split_packages = do_split_packages(d, libdir, '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s', 'Split package for %s', allow_dirs=True, allow_links=True, recursive=True) - split_staticdev_packages = do_split_packages(d, libllvm_libdir, '^lib(.*)\.a$', 'libllvm${LLVM_RELEASE}-%s-staticdev', 'Split staticdev package for %s', allow_dirs=True) + split_dbg_packages = do_split_packages(d, libllvm_libdir+'/.debug', r'^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s-dbg', 'Split debug package for %s', allow_dirs=True) + split_packages = do_split_packages(d, libdir, r'^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s', 'Split package for %s', allow_dirs=True, allow_links=True, recursive=True) + split_staticdev_packages = do_split_packages(d, libllvm_libdir, r'^lib(.*)\.a$', 'libllvm${LLVM_RELEASE}-%s-staticdev', 'Split staticdev package for %s', allow_dirs=True) if split_packages: pn = d.getVar('PN') d.appendVar('RDEPENDS_' + pn, ' '+' '.join(split_packages)) -- cgit 1.2.3-korg