aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-14 15:49:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-14 23:02:47 +0000
commit4b1c0c7d5525fc4cea9e0f02ec54e92a6fbc6199 (patch)
treea7cd5e4a23914ba5b5812b98587d97c5e8b8dd2f /meta/recipes-devtools
parentfa7020c040189ae904625b5c60c8a7e79dc1145e (diff)
downloadopenembedded-core-contrib-4b1c0c7d5525fc4cea9e0f02ec54e92a6fbc6199.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/llvm/llvm_git.bb20
-rw-r--r--meta/recipes-devtools/orc/orc_0.4.28.bb2
-rw-r--r--meta/recipes-devtools/perl-sanity/perl-ptest.inc2
-rw-r--r--meta/recipes-devtools/perl-sanity/perl_5.28.1.bb12
4 files changed, 18 insertions, 18 deletions
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))
diff --git a/meta/recipes-devtools/orc/orc_0.4.28.bb b/meta/recipes-devtools/orc/orc_0.4.28.bb
index 415de64dc4..03cddad8bb 100644
--- a/meta/recipes-devtools/orc/orc_0.4.28.bb
+++ b/meta/recipes-devtools/orc/orc_0.4.28.bb
@@ -19,7 +19,7 @@ FILES_${PN} = "${bindir}/*"
python populate_packages_prepend () {
libdir = d.expand('${libdir}')
- do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
+ do_split_packages(d, libdir, r'^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
}
do_compile_prepend_class-native () {
diff --git a/meta/recipes-devtools/perl-sanity/perl-ptest.inc b/meta/recipes-devtools/perl-sanity/perl-ptest.inc
index 597e5d841e..9dd9b7da57 100644
--- a/meta/recipes-devtools/perl-sanity/perl-ptest.inc
+++ b/meta/recipes-devtools/perl-sanity/perl-ptest.inc
@@ -46,7 +46,7 @@ python populate_packages_prepend() {
# do_split_packages requires a pair of () in the regex, but we have nothing
# to match, so use an empty pair.
if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
- do_split_packages(d, d.expand('${libdir}/perl/${PV}'), '.*\.t()',
+ do_split_packages(d, d.expand('${libdir}/perl/${PV}'), r'.*\.t()',
'${PN}-ptest%s', '%s', recursive=True, match_path=True)
}
diff --git a/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb b/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb
index 0df821d446..71892a2436 100644
--- a/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb
+++ b/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb
@@ -222,12 +222,12 @@ PACKAGESPLITFUNCS_prepend = "split_perl_packages "
python split_perl_packages () {
libdir = d.expand('${libdir}/perl5/${PV}')
- do_split_packages(d, libdir, '.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
- do_split_packages(d, libdir, '.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
- do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
- do_split_packages(d, libdir, 'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
- do_split_packages(d, libdir, '.*linux/([^\/].*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
- do_split_packages(d, libdir, '(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'.*linux/([^\/].*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+ do_split_packages(d, libdir, r'(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
# perl-modules should recommend every perl module, and only the
# modules. Don't attempt to use the result of do_split_packages() as some