summaryrefslogtreecommitdiffstats
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-16 15:35:07 +0000
commitcd4b8a8553f9d551af27941910cf4d3405ecb7b0 (patch)
tree4f2c58eca95fd5ea9a4538a66a4875fd9d947b0d
parent1ee53881eea3a7ca4d4f6a5ca9c4c6e6488d2348 (diff)
downloadpoky-cd4b8a8553f9d551af27941910cf4d3405ecb7b0.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. (From OE-Core rev: 4b1c0c7d5525fc4cea9e0f02ec54e92a6fbc6199) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/debian.bbclass6
-rw-r--r--meta/classes/gconf.bbclass2
-rw-r--r--meta/classes/kernel-module-split.bbclass2
-rw-r--r--meta/classes/kernel.bbclass2
-rw-r--r--meta/classes/libc-package.bbclass26
-rw-r--r--meta/classes/package.bbclass22
-rw-r--r--meta/lib/oe/license.py8
-rw-r--r--meta/lib/oe/package.py2
-rw-r--r--meta/lib/oe/package_manager.py24
-rw-r--r--meta/lib/oe/patch.py4
-rw-r--r--meta/lib/oe/rootfs.py16
-rw-r--r--meta/lib/oe/utils.py4
-rw-r--r--meta/recipes-connectivity/connman/connman.inc4
-rw-r--r--meta/recipes-core/ncurses/ncurses.inc4
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc2
-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
-rw-r--r--meta/recipes-extended/iptables/iptables_1.6.2.bb2
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.52.bb2
-rw-r--r--meta/recipes-extended/pam/libpam_1.3.0.bb4
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb2
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3.inc4
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.24.32.bb4
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc4
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb2
-rw-r--r--meta/recipes-multimedia/alsa/alsa-plugins_1.1.6.bb2
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-package.inc10
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc4
30 files changed, 102 insertions, 102 deletions
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index 989ea8f8d2..6f8a599ccb 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -29,11 +29,11 @@ python debian_package_name_hook () {
29 29
30 pkgdest = d.getVar("PKGDEST") 30 pkgdest = d.getVar("PKGDEST")
31 packages = d.getVar('PACKAGES') 31 packages = d.getVar('PACKAGES')
32 so_re = re.compile("lib.*\.so") 32 so_re = re.compile(r"lib.*\.so")
33 33
34 def socrunch(s): 34 def socrunch(s):
35 s = s.lower().replace('_', '-') 35 s = s.lower().replace('_', '-')
36 m = re.match("^(.*)(.)\.so\.(.*)$", s) 36 m = re.match(r"^(.*)(.)\.so\.(.*)$", s)
37 if m is None: 37 if m is None:
38 return None 38 return None
39 if m.group(2) in '0123456789': 39 if m.group(2) in '0123456789':
@@ -79,7 +79,7 @@ python debian_package_name_hook () {
79 try: 79 try:
80 cmd = [d.expand("${TARGET_PREFIX}objdump"), "-p", f] 80 cmd = [d.expand("${TARGET_PREFIX}objdump"), "-p", f]
81 output = subprocess.check_output(cmd).decode("utf-8") 81 output = subprocess.check_output(cmd).decode("utf-8")
82 for m in re.finditer("\s+SONAME\s+([^\s]+)", output): 82 for m in re.finditer(r"\s+SONAME\s+([^\s]+)", output):
83 if m.group(1) not in sonames: 83 if m.group(1) not in sonames:
84 sonames.append(m.group(1)) 84 sonames.append(m.group(1))
85 except subprocess.CalledProcessError: 85 except subprocess.CalledProcessError:
diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass
index 4e0ee2e7d5..3e3c509d5f 100644
--- a/meta/classes/gconf.bbclass
+++ b/meta/classes/gconf.bbclass
@@ -49,7 +49,7 @@ python populate_packages_append () {
49 for pkg in packages: 49 for pkg in packages:
50 schema_dir = '%s/%s/etc/gconf/schemas' % (pkgdest, pkg) 50 schema_dir = '%s/%s/etc/gconf/schemas' % (pkgdest, pkg)
51 schemas = [] 51 schemas = []
52 schema_re = re.compile(".*\.schemas$") 52 schema_re = re.compile(r".*\.schemas$")
53 if os.path.exists(schema_dir): 53 if os.path.exists(schema_dir):
54 for f in os.listdir(schema_dir): 54 for f in os.listdir(schema_dir):
55 if schema_re.match(f): 55 if schema_re.match(f):
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index e8996cf59b..e8d3eb5105 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -133,7 +133,7 @@ python split_kernel_module_packages () {
133 kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel" 133 kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel"
134 kernel_version = d.getVar("KERNEL_VERSION") 134 kernel_version = d.getVar("KERNEL_VERSION")
135 135
136 module_regex = '^(.*)\.k?o$' 136 module_regex = r'^(.*)\.k?o$'
137 137
138 module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX') 138 module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
139 module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX') 139 module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 45cb4fabc1..c0889bd3ee 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -578,7 +578,7 @@ pkg_postinst_${KERNEL_PACKAGE_NAME}-base () {
578PACKAGESPLITFUNCS_prepend = "split_kernel_packages " 578PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
579 579
580python split_kernel_packages () { 580python split_kernel_packages () {
581 do_split_packages(d, root='${nonarch_base_libdir}/firmware', file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='${KERNEL_PACKAGE_NAME}-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 581 do_split_packages(d, root='${nonarch_base_libdir}/firmware', file_regex=r'^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='${KERNEL_PACKAGE_NAME}-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
582} 582}
583 583
584# Many scripts want to look in arch/$arch/boot for the bootable 584# Many scripts want to look in arch/$arch/boot for the bootable
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 82d642e15e..0b4c666a74 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -113,8 +113,8 @@ python package_do_split_gconvs () {
113 def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group): 113 def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group):
114 deps = [] 114 deps = []
115 f = open(fn, "rb") 115 f = open(fn, "rb")
116 c_re = re.compile('^copy "(.*)"') 116 c_re = re.compile(r'^copy "(.*)"')
117 i_re = re.compile('^include "(\w+)".*') 117 i_re = re.compile(r'^include "(\w+)".*')
118 for l in f.readlines(): 118 for l in f.readlines():
119 l = l.decode("latin-1") 119 l = l.decode("latin-1")
120 m = c_re.match(l) or i_re.match(l) 120 m = c_re.match(l) or i_re.match(l)
@@ -128,15 +128,15 @@ python package_do_split_gconvs () {
128 if bpn != 'glibc': 128 if bpn != 'glibc':
129 d.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc')) 129 d.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc'))
130 130
131 do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern=bpn+'-gconv-%s', \ 131 do_split_packages(d, gconv_libdir, file_regex=r'^(.*)\.so$', output_pattern=bpn+'-gconv-%s', \
132 description='gconv module for character set %s', hook=calc_gconv_deps, \ 132 description='gconv module for character set %s', hook=calc_gconv_deps, \
133 extra_depends=bpn+'-gconv') 133 extra_depends=bpn+'-gconv')
134 134
135 def calc_charmap_deps(fn, pkg, file_regex, output_pattern, group): 135 def calc_charmap_deps(fn, pkg, file_regex, output_pattern, group):
136 deps = [] 136 deps = []
137 f = open(fn, "rb") 137 f = open(fn, "rb")
138 c_re = re.compile('^copy "(.*)"') 138 c_re = re.compile(r'^copy "(.*)"')
139 i_re = re.compile('^include "(\w+)".*') 139 i_re = re.compile(r'^include "(\w+)".*')
140 for l in f.readlines(): 140 for l in f.readlines():
141 l = l.decode("latin-1") 141 l = l.decode("latin-1")
142 m = c_re.match(l) or i_re.match(l) 142 m = c_re.match(l) or i_re.match(l)
@@ -150,14 +150,14 @@ python package_do_split_gconvs () {
150 if bpn != 'glibc': 150 if bpn != 'glibc':
151 d.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc')) 151 d.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc'))
152 152
153 do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern=bpn+'-charmap-%s', \ 153 do_split_packages(d, charmap_dir, file_regex=r'^(.*)\.gz$', output_pattern=bpn+'-charmap-%s', \
154 description='character map for %s encoding', hook=calc_charmap_deps, extra_depends='') 154 description='character map for %s encoding', hook=calc_charmap_deps, extra_depends='')
155 155
156 def calc_locale_deps(fn, pkg, file_regex, output_pattern, group): 156 def calc_locale_deps(fn, pkg, file_regex, output_pattern, group):
157 deps = [] 157 deps = []
158 f = open(fn, "rb") 158 f = open(fn, "rb")
159 c_re = re.compile('^copy "(.*)"') 159 c_re = re.compile(r'^copy "(.*)"')
160 i_re = re.compile('^include "(\w+)".*') 160 i_re = re.compile(r'^include "(\w+)".*')
161 for l in f.readlines(): 161 for l in f.readlines():
162 l = l.decode("latin-1") 162 l = l.decode("latin-1")
163 m = c_re.match(l) or i_re.match(l) 163 m = c_re.match(l) or i_re.match(l)
@@ -171,13 +171,13 @@ python package_do_split_gconvs () {
171 if bpn != 'glibc': 171 if bpn != 'glibc':
172 d.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc')) 172 d.setVar('RPROVIDES_%s' % pkg, pkg.replace(bpn, 'glibc'))
173 173
174 do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern=bpn+'-localedata-%s', \ 174 do_split_packages(d, locales_dir, file_regex=r'(.*)', output_pattern=bpn+'-localedata-%s', \
175 description='locale definition for %s', hook=calc_locale_deps, extra_depends='') 175 description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
176 d.setVar('PACKAGES', d.getVar('PACKAGES', False) + ' ' + d.getVar('MLPREFIX', False) + bpn + '-gconv') 176 d.setVar('PACKAGES', d.getVar('PACKAGES', False) + ' ' + d.getVar('MLPREFIX', False) + bpn + '-gconv')
177 177
178 use_bin = d.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE") 178 use_bin = d.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE")
179 179
180 dot_re = re.compile("(.*)\.(.*)") 180 dot_re = re.compile(r"(.*)\.(.*)")
181 181
182 # Read in supported locales and associated encodings 182 # Read in supported locales and associated encodings
183 supported = {} 183 supported = {}
@@ -290,7 +290,7 @@ python package_do_split_gconvs () {
290 d.setVar('ALLOW_EMPTY_%s' % pkgname, '1') 290 d.setVar('ALLOW_EMPTY_%s' % pkgname, '1')
291 d.setVar('PACKAGES', '%s %s' % (pkgname, d.getVar('PACKAGES'))) 291 d.setVar('PACKAGES', '%s %s' % (pkgname, d.getVar('PACKAGES')))
292 rprovides = ' %svirtual-locale-%s' % (mlprefix, legitimize_package_name(name)) 292 rprovides = ' %svirtual-locale-%s' % (mlprefix, legitimize_package_name(name))
293 m = re.match("(.*)_(.*)", name) 293 m = re.match(r"(.*)_(.*)", name)
294 if m: 294 if m:
295 rprovides += ' %svirtual-locale-%s' % (mlprefix, m.group(1)) 295 rprovides += ' %svirtual-locale-%s' % (mlprefix, m.group(1))
296 d.setVar('RPROVIDES_%s' % pkgname, rprovides) 296 d.setVar('RPROVIDES_%s' % pkgname, rprovides)
@@ -356,12 +356,12 @@ python package_do_split_gconvs () {
356 if use_bin in ('compile', 'precompiled'): 356 if use_bin in ('compile', 'precompiled'):
357 lcsplit = d.getVar('GLIBC_SPLIT_LC_PACKAGES') 357 lcsplit = d.getVar('GLIBC_SPLIT_LC_PACKAGES')
358 if lcsplit and int(lcsplit): 358 if lcsplit and int(lcsplit):
359 do_split_packages(d, binary_locales_dir, file_regex='^(.*/LC_\w+)', \ 359 do_split_packages(d, binary_locales_dir, file_regex=r'^(.*/LC_\w+)', \
360 output_pattern=bpn+'-binary-localedata-%s', \ 360 output_pattern=bpn+'-binary-localedata-%s', \
361 description='binary locale definition for %s', recursive=True, 361 description='binary locale definition for %s', recursive=True,
362 hook=metapkg_hook, extra_depends='', allow_dirs=True, match_path=True) 362 hook=metapkg_hook, extra_depends='', allow_dirs=True, match_path=True)
363 else: 363 else:
364 do_split_packages(d, binary_locales_dir, file_regex='(.*)', \ 364 do_split_packages(d, binary_locales_dir, file_regex=r'(.*)', \
365 output_pattern=bpn+'-binary-localedata-%s', \ 365 output_pattern=bpn+'-binary-localedata-%s', \
366 description='binary locale definition for %s', extra_depends='', allow_dirs=True) 366 description='binary locale definition for %s', extra_depends='', allow_dirs=True)
367 else: 367 else:
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 7a7bc9e2f0..853735f0c6 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -75,7 +75,7 @@ def legitimize_package_name(s):
75 return ('\\u%s' % cp).encode('latin-1').decode('unicode_escape') 75 return ('\\u%s' % cp).encode('latin-1').decode('unicode_escape')
76 76
77 # Handle unicode codepoints encoded as <U0123>, as in glibc locale files. 77 # Handle unicode codepoints encoded as <U0123>, as in glibc locale files.
78 s = re.sub('<U([0-9A-Fa-f]{1,4})>', fixutf, s) 78 s = re.sub(r'<U([0-9A-Fa-f]{1,4})>', fixutf, s)
79 79
80 # Remaining package name validity fixes 80 # Remaining package name validity fixes
81 return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-') 81 return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')
@@ -1590,8 +1590,8 @@ python package_do_shlibs() {
1590 bb.note("not generating shlibs") 1590 bb.note("not generating shlibs")
1591 return 1591 return
1592 1592
1593 lib_re = re.compile("^.*\.so") 1593 lib_re = re.compile(r"^.*\.so")
1594 libdir_re = re.compile(".*/%s$" % d.getVar('baselib')) 1594 libdir_re = re.compile(r".*/%s$" % d.getVar('baselib'))
1595 1595
1596 packages = d.getVar('PACKAGES') 1596 packages = d.getVar('PACKAGES')
1597 1597
@@ -1632,17 +1632,17 @@ python package_do_shlibs() {
1632 fd.close() 1632 fd.close()
1633 rpath = tuple() 1633 rpath = tuple()
1634 for l in lines: 1634 for l in lines:
1635 m = re.match("\s+RPATH\s+([^\s]*)", l) 1635 m = re.match(r"\s+RPATH\s+([^\s]*)", l)
1636 if m: 1636 if m:
1637 rpaths = m.group(1).replace("$ORIGIN", ldir).split(":") 1637 rpaths = m.group(1).replace("$ORIGIN", ldir).split(":")
1638 rpath = tuple(map(os.path.normpath, rpaths)) 1638 rpath = tuple(map(os.path.normpath, rpaths))
1639 for l in lines: 1639 for l in lines:
1640 m = re.match("\s+NEEDED\s+([^\s]*)", l) 1640 m = re.match(r"\s+NEEDED\s+([^\s]*)", l)
1641 if m: 1641 if m:
1642 dep = m.group(1) 1642 dep = m.group(1)
1643 if dep not in needed: 1643 if dep not in needed:
1644 needed.add((dep, file, rpath)) 1644 needed.add((dep, file, rpath))
1645 m = re.match("\s+SONAME\s+([^\s]*)", l) 1645 m = re.match(r"\s+SONAME\s+([^\s]*)", l)
1646 if m: 1646 if m:
1647 this_soname = m.group(1) 1647 this_soname = m.group(1)
1648 prov = (this_soname, ldir, pkgver) 1648 prov = (this_soname, ldir, pkgver)
@@ -1722,7 +1722,7 @@ python package_do_shlibs() {
1722 out, err = p.communicate() 1722 out, err = p.communicate()
1723 # process the output, grabbing all .dll names 1723 # process the output, grabbing all .dll names
1724 if p.returncode == 0: 1724 if p.returncode == 0:
1725 for m in re.finditer("DLL Name: (.*?\.dll)$", out.decode(), re.MULTILINE | re.IGNORECASE): 1725 for m in re.finditer(r"DLL Name: (.*?\.dll)$", out.decode(), re.MULTILINE | re.IGNORECASE):
1726 dllname = m.group(1) 1726 dllname = m.group(1)
1727 if dllname: 1727 if dllname:
1728 needed[pkg].add((dllname, file, tuple())) 1728 needed[pkg].add((dllname, file, tuple()))
@@ -1883,9 +1883,9 @@ python package_do_pkgconfig () {
1883 shlibs_dirs = d.getVar('SHLIBSDIRS').split() 1883 shlibs_dirs = d.getVar('SHLIBSDIRS').split()
1884 shlibswork_dir = d.getVar('SHLIBSWORKDIR') 1884 shlibswork_dir = d.getVar('SHLIBSWORKDIR')
1885 1885
1886 pc_re = re.compile('(.*)\.pc$') 1886 pc_re = re.compile(r'(.*)\.pc$')
1887 var_re = re.compile('(.*)=(.*)') 1887 var_re = re.compile(r'(.*)=(.*)')
1888 field_re = re.compile('(.*): (.*)') 1888 field_re = re.compile(r'(.*): (.*)')
1889 1889
1890 pkgconfig_provided = {} 1890 pkgconfig_provided = {}
1891 pkgconfig_needed = {} 1891 pkgconfig_needed = {}
@@ -1933,7 +1933,7 @@ python package_do_pkgconfig () {
1933 if not os.path.exists(dir): 1933 if not os.path.exists(dir):
1934 continue 1934 continue
1935 for file in os.listdir(dir): 1935 for file in os.listdir(dir):
1936 m = re.match('^(.*)\.pclist$', file) 1936 m = re.match(r'^(.*)\.pclist$', file)
1937 if m: 1937 if m:
1938 pkg = m.group(1) 1938 pkg = m.group(1)
1939 fd = open(os.path.join(dir, file)) 1939 fd = open(os.path.join(dir, file))
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index ca385d5187..04f5b316a9 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -13,8 +13,8 @@ def license_ok(license, dont_want_licenses):
13 # will exclude a trailing '+' character from LICENSE in 13 # will exclude a trailing '+' character from LICENSE in
14 # case INCOMPATIBLE_LICENSE is not a 'X+' license. 14 # case INCOMPATIBLE_LICENSE is not a 'X+' license.
15 lic = license 15 lic = license
16 if not re.search('\+$', dwl): 16 if not re.search(r'\+$', dwl):
17 lic = re.sub('\+', '', license) 17 lic = re.sub(r'\+', '', license)
18 if fnmatch(lic, dwl): 18 if fnmatch(lic, dwl):
19 return False 19 return False
20 return True 20 return True
@@ -40,8 +40,8 @@ class InvalidLicense(LicenseError):
40 return "invalid characters in license '%s'" % self.license 40 return "invalid characters in license '%s'" % self.license
41 41
42license_operator_chars = '&|() ' 42license_operator_chars = '&|() '
43license_operator = re.compile('([' + license_operator_chars + '])') 43license_operator = re.compile(r'([' + license_operator_chars + '])')
44license_pattern = re.compile('[a-zA-Z0-9.+_\-]+$') 44license_pattern = re.compile(r'[a-zA-Z0-9.+_\-]+$')
45 45
46class LicenseVisitor(ast.NodeVisitor): 46class LicenseVisitor(ast.NodeVisitor):
47 """Get elements based on OpenEmbedded license strings""" 47 """Get elements based on OpenEmbedded license strings"""
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index efd36b3758..6e83f01f14 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -255,7 +255,7 @@ def read_shlib_providers(d):
255 255
256 shlib_provider = {} 256 shlib_provider = {}
257 shlibs_dirs = d.getVar('SHLIBSDIRS').split() 257 shlibs_dirs = d.getVar('SHLIBSDIRS').split()
258 list_re = re.compile('^(.*)\.list$') 258 list_re = re.compile(r'^(.*)\.list$')
259 # Go from least to most specific since the last one found wins 259 # Go from least to most specific since the last one found wins
260 for dir in reversed(shlibs_dirs): 260 for dir in reversed(shlibs_dirs):
261 bb.debug(2, "Reading shlib providers in %s" % (dir)) 261 bb.debug(2, "Reading shlib providers in %s" % (dir))
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 7ff76c61cd..1087144d47 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -29,7 +29,7 @@ def opkg_query(cmd_output):
29 a dictionary with the information of the packages. This is used 29 a dictionary with the information of the packages. This is used
30 when the packages are in deb or ipk format. 30 when the packages are in deb or ipk format.
31 """ 31 """
32 verregex = re.compile(' \([=<>]* [^ )]*\)') 32 verregex = re.compile(r' \([=<>]* [^ )]*\)')
33 output = dict() 33 output = dict()
34 pkg = "" 34 pkg = ""
35 arch = "" 35 arch = ""
@@ -252,8 +252,8 @@ class DpkgIndexer(Indexer):
252 with open(os.path.join(self.d.expand("${STAGING_ETCDIR_NATIVE}"), 252 with open(os.path.join(self.d.expand("${STAGING_ETCDIR_NATIVE}"),
253 "apt", "apt.conf.sample")) as apt_conf_sample: 253 "apt", "apt.conf.sample")) as apt_conf_sample:
254 for line in apt_conf_sample.read().split("\n"): 254 for line in apt_conf_sample.read().split("\n"):
255 line = re.sub("#ROOTFS#", "/dev/null", line) 255 line = re.sub(r"#ROOTFS#", "/dev/null", line)
256 line = re.sub("#APTCONF#", self.apt_conf_dir, line) 256 line = re.sub(r"#APTCONF#", self.apt_conf_dir, line)
257 apt_conf.write(line + "\n") 257 apt_conf.write(line + "\n")
258 258
259 def write_index(self): 259 def write_index(self):
@@ -408,7 +408,7 @@ class PackageManager(object, metaclass=ABCMeta):
408 with open(postinst_intercept_hook) as intercept: 408 with open(postinst_intercept_hook) as intercept:
409 registered_pkgs = None 409 registered_pkgs = None
410 for line in intercept.read().split("\n"): 410 for line in intercept.read().split("\n"):
411 m = re.match("^##PKGS:(.*)", line) 411 m = re.match(r"^##PKGS:(.*)", line)
412 if m is not None: 412 if m is not None:
413 registered_pkgs = m.group(1).strip() 413 registered_pkgs = m.group(1).strip()
414 break 414 break
@@ -1217,7 +1217,7 @@ class OpkgPM(OpkgDpkgPM):
1217 priority += 5 1217 priority += 5
1218 1218
1219 for line in (self.d.getVar('IPK_FEED_URIS') or "").split(): 1219 for line in (self.d.getVar('IPK_FEED_URIS') or "").split():
1220 feed_match = re.match("^[ \t]*(.*)##([^ \t]*)[ \t]*$", line) 1220 feed_match = re.match(r"^[ \t]*(.*)##([^ \t]*)[ \t]*$", line)
1221 1221
1222 if feed_match is not None: 1222 if feed_match is not None:
1223 feed_name = feed_match.group(1) 1223 feed_name = feed_match.group(1)
@@ -1597,7 +1597,7 @@ class DpkgPM(OpkgDpkgPM):
1597 1597
1598 with open(status_file, "r") as status: 1598 with open(status_file, "r") as status:
1599 for line in status.read().split('\n'): 1599 for line in status.read().split('\n'):
1600 m = re.match("^Package: (.*)", line) 1600 m = re.match(r"^Package: (.*)", line)
1601 if m is not None: 1601 if m is not None:
1602 installed_pkgs.append(m.group(1)) 1602 installed_pkgs.append(m.group(1))
1603 1603
@@ -1662,13 +1662,13 @@ class DpkgPM(OpkgDpkgPM):
1662 # rename *.dpkg-new files/dirs 1662 # rename *.dpkg-new files/dirs
1663 for root, dirs, files in os.walk(self.target_rootfs): 1663 for root, dirs, files in os.walk(self.target_rootfs):
1664 for dir in dirs: 1664 for dir in dirs:
1665 new_dir = re.sub("\.dpkg-new", "", dir) 1665 new_dir = re.sub(r"\.dpkg-new", "", dir)
1666 if dir != new_dir: 1666 if dir != new_dir:
1667 os.rename(os.path.join(root, dir), 1667 os.rename(os.path.join(root, dir),
1668 os.path.join(root, new_dir)) 1668 os.path.join(root, new_dir))
1669 1669
1670 for file in files: 1670 for file in files:
1671 new_file = re.sub("\.dpkg-new", "", file) 1671 new_file = re.sub(r"\.dpkg-new", "", file)
1672 if file != new_file: 1672 if file != new_file:
1673 os.rename(os.path.join(root, file), 1673 os.rename(os.path.join(root, file),
1674 os.path.join(root, new_file)) 1674 os.path.join(root, new_file))
@@ -1733,7 +1733,7 @@ class DpkgPM(OpkgDpkgPM):
1733 sources_file.write("deb %s ./\n" % uri) 1733 sources_file.write("deb %s ./\n" % uri)
1734 1734
1735 def _create_configs(self, archs, base_archs): 1735 def _create_configs(self, archs, base_archs):
1736 base_archs = re.sub("_", "-", base_archs) 1736 base_archs = re.sub(r"_", r"-", base_archs)
1737 1737
1738 if os.path.exists(self.apt_conf_dir): 1738 if os.path.exists(self.apt_conf_dir):
1739 bb.utils.remove(self.apt_conf_dir, True) 1739 bb.utils.remove(self.apt_conf_dir, True)
@@ -1787,7 +1787,7 @@ class DpkgPM(OpkgDpkgPM):
1787 with open(self.apt_conf_file, "w+") as apt_conf: 1787 with open(self.apt_conf_file, "w+") as apt_conf:
1788 with open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as apt_conf_sample: 1788 with open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as apt_conf_sample:
1789 for line in apt_conf_sample.read().split("\n"): 1789 for line in apt_conf_sample.read().split("\n"):
1790 match_arch = re.match(" Architecture \".*\";$", line) 1790 match_arch = re.match(r" Architecture \".*\";$", line)
1791 architectures = "" 1791 architectures = ""
1792 if match_arch: 1792 if match_arch:
1793 for base_arch in base_arch_list: 1793 for base_arch in base_arch_list:
@@ -1795,8 +1795,8 @@ class DpkgPM(OpkgDpkgPM):
1795 apt_conf.write(" Architectures {%s};\n" % architectures); 1795 apt_conf.write(" Architectures {%s};\n" % architectures);
1796 apt_conf.write(" Architecture \"%s\";\n" % base_archs) 1796 apt_conf.write(" Architecture \"%s\";\n" % base_archs)
1797 else: 1797 else:
1798 line = re.sub("#ROOTFS#", self.target_rootfs, line) 1798 line = re.sub(r"#ROOTFS#", self.target_rootfs, line)
1799 line = re.sub("#APTCONF#", self.apt_conf_dir, line) 1799 line = re.sub(r"#APTCONF#", self.apt_conf_dir, line)
1800 apt_conf.write(line + "\n") 1800 apt_conf.write(line + "\n")
1801 1801
1802 target_dpkg_dir = "%s/var/lib/dpkg" % self.target_rootfs 1802 target_dpkg_dir = "%s/var/lib/dpkg" % self.target_rootfs
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index e0f0604251..07a40fc50e 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -334,8 +334,8 @@ class GitApplyTree(PatchTree):
334 @staticmethod 334 @staticmethod
335 def interpretPatchHeader(headerlines): 335 def interpretPatchHeader(headerlines):
336 import re 336 import re
337 author_re = re.compile('[\S ]+ <\S+@\S+\.\S+>') 337 author_re = re.compile(r'[\S ]+ <\S+@\S+\.\S+>')
338 from_commit_re = re.compile('^From [a-z0-9]{40} .*') 338 from_commit_re = re.compile(r'^From [a-z0-9]{40} .*')
339 outlines = [] 339 outlines = []
340 author = None 340 author = None
341 date = None 341 date = None
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 4273891699..551dcfc75f 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -354,9 +354,9 @@ class Rootfs(object, metaclass=ABCMeta):
354class RpmRootfs(Rootfs): 354class RpmRootfs(Rootfs):
355 def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None): 355 def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
356 super(RpmRootfs, self).__init__(d, progress_reporter, logcatcher) 356 super(RpmRootfs, self).__init__(d, progress_reporter, logcatcher)
357 self.log_check_regex = '(unpacking of archive failed|Cannot find package'\ 357 self.log_check_regex = r'(unpacking of archive failed|Cannot find package'\
358 '|exit 1|ERROR: |Error: |Error |ERROR '\ 358 r'|exit 1|ERROR: |Error: |Error |ERROR '\
359 '|Failed |Failed: |Failed$|Failed\(\d+\):)' 359 r'|Failed |Failed: |Failed$|Failed\(\d+\):)'
360 self.manifest = RpmManifest(d, manifest_dir) 360 self.manifest = RpmManifest(d, manifest_dir)
361 361
362 self.pm = RpmPM(d, 362 self.pm = RpmPM(d,
@@ -499,7 +499,7 @@ class DpkgOpkgRootfs(Rootfs):
499 pkg_depends_list = [] 499 pkg_depends_list = []
500 # filter version requirements like libc (>= 1.1) 500 # filter version requirements like libc (>= 1.1)
501 for dep in pkg_depends.split(', '): 501 for dep in pkg_depends.split(', '):
502 m_dep = re.match("^(.*) \(.*\)$", dep) 502 m_dep = re.match(r"^(.*) \(.*\)$", dep)
503 if m_dep: 503 if m_dep:
504 dep = m_dep.group(1) 504 dep = m_dep.group(1)
505 pkg_depends_list.append(dep) 505 pkg_depends_list.append(dep)
@@ -515,9 +515,9 @@ class DpkgOpkgRootfs(Rootfs):
515 data = status.read() 515 data = status.read()
516 status.close() 516 status.close()
517 for line in data.split('\n'): 517 for line in data.split('\n'):
518 m_pkg = re.match("^Package: (.*)", line) 518 m_pkg = re.match(r"^Package: (.*)", line)
519 m_status = re.match("^Status:.*unpacked", line) 519 m_status = re.match(r"^Status:.*unpacked", line)
520 m_depends = re.match("^Depends: (.*)", line) 520 m_depends = re.match(r"^Depends: (.*)", line)
521 521
522 #Only one of m_pkg, m_status or m_depends is not None at time 522 #Only one of m_pkg, m_status or m_depends is not None at time
523 #If m_pkg is not None, we started a new package 523 #If m_pkg is not None, we started a new package
@@ -771,7 +771,7 @@ class OpkgRootfs(DpkgOpkgRootfs):
771 if allow_replace is None: 771 if allow_replace is None:
772 allow_replace = "" 772 allow_replace = ""
773 773
774 allow_rep = re.compile(re.sub("\|$", "", allow_replace)) 774 allow_rep = re.compile(re.sub(r"\|$", r"", allow_replace))
775 error_prompt = "Multilib check error:" 775 error_prompt = "Multilib check error:"
776 776
777 files = {} 777 files = {}
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index ee6f0e6647..7b574ffd30 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -326,7 +326,7 @@ def multiprocess_launch(target, items, d, extraargs=None):
326 326
327def squashspaces(string): 327def squashspaces(string):
328 import re 328 import re
329 return re.sub("\s+", " ", string).strip() 329 return re.sub(r"\s+", " ", string).strip()
330 330
331def format_pkg_list(pkg_dict, ret_format=None): 331def format_pkg_list(pkg_dict, ret_format=None):
332 output = [] 332 output = []
@@ -374,7 +374,7 @@ def host_gcc_version(d, taskcontextonly=False):
374 except subprocess.CalledProcessError as e: 374 except subprocess.CalledProcessError as e:
375 bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8"))) 375 bb.fatal("Error running %s --version: %s" % (compiler, e.output.decode("utf-8")))
376 376
377 match = re.match(".* (\d\.\d)\.\d.*", output.split('\n')[0]) 377 match = re.match(r".* (\d\.\d)\.\d.*", output.split('\n')[0])
378 if not match: 378 if not match:
379 bb.fatal("Can't get compiler version from %s --version output" % compiler) 379 bb.fatal("Can't get compiler version from %s --version output" % compiler)
380 380
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 0ba375137d..0a117e44a4 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -133,14 +133,14 @@ python populate_packages_prepend() {
133 add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False) 133 add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False)
134 plugin_dir = d.expand('${libdir}/connman/plugins/') 134 plugin_dir = d.expand('${libdir}/connman/plugins/')
135 plugin_name = d.expand('${PN}-plugin-%s') 135 plugin_name = d.expand('${PN}-plugin-%s')
136 do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \ 136 do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
137 '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True ) 137 '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True )
138 138
139 hook = lambda file,pkg,x,y,z: \ 139 hook = lambda file,pkg,x,y,z: \
140 add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True) 140 add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True)
141 plugin_dir = d.expand('${libdir}/connman/plugins-vpn/') 141 plugin_dir = d.expand('${libdir}/connman/plugins-vpn/')
142 plugin_name = d.expand('${PN}-plugin-vpn-%s') 142 plugin_name = d.expand('${PN}-plugin-vpn-%s')
143 do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \ 143 do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \
144 '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True ) 144 '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True )
145} 145}
146 146
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index 99fc47869e..5f2cc35823 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -260,9 +260,9 @@ python populate_packages_prepend () {
260 libdir = d.expand("${libdir}") 260 libdir = d.expand("${libdir}")
261 base_libdir = d.expand("${base_libdir}") 261 base_libdir = d.expand("${base_libdir}")
262 pnbase = d.expand("${PN}-lib%s") 262 pnbase = d.expand("${PN}-lib%s")
263 do_split_packages(d, libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) 263 do_split_packages(d, libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
264 if libdir is not base_libdir: 264 if libdir is not base_libdir:
265 do_split_packages(d, base_libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) 265 do_split_packages(d, base_libdir, r'^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
266} 266}
267 267
268 268
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index b5f77f7b6b..e514041a19 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -314,7 +314,7 @@ python do_package_prepend () {
314} 314}
315 315
316python populate_packages_prepend() { 316python populate_packages_prepend() {
317 do_split_packages(d, '${base_libdir}', '^lib(.*)\.so\..*$', 317 do_split_packages(d, '${base_libdir}', r'^lib(.*)\.so\..*$',
318 output_pattern='util-linux-lib%s', 318 output_pattern='util-linux-lib%s',
319 description='util-linux lib%s', 319 description='util-linux lib%s',
320 extra_depends='', prepend=True, allow_links=True) 320 extra_depends='', prepend=True, allow_links=True)
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"
34def get_llvm_arch(bb, d, arch_var): 34def get_llvm_arch(bb, d, arch_var):
35 import re 35 import re
36 a = d.getVar(arch_var) 36 a = d.getVar(arch_var)
37 if re.match('(i.86|athlon|x86.64)$', a): return 'X86' 37 if re.match(r'(i.86|athlon|x86.64)$', a): return 'X86'
38 elif re.match('arm$', a): return 'ARM' 38 elif re.match(r'arm$', a): return 'ARM'
39 elif re.match('armeb$', a): return 'ARM' 39 elif re.match(r'armeb$', a): return 'ARM'
40 elif re.match('aarch64$', a): return 'AArch64' 40 elif re.match(r'aarch64$', a): return 'AArch64'
41 elif re.match('aarch64_be$', a): return 'AArch64' 41 elif re.match(r'aarch64_be$', a): return 'AArch64'
42 elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips' 42 elif re.match(r'mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips'
43 elif re.match('p(pc|owerpc)(|64)', a): return 'PowerPC' 43 elif re.match(r'p(pc|owerpc)(|64)', a): return 'PowerPC'
44 else: 44 else:
45 raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a) 45 raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a)
46 46
@@ -172,9 +172,9 @@ INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm += "dev-so"
172python llvm_populate_packages() { 172python llvm_populate_packages() {
173 libdir = bb.data.expand('${libdir}', d) 173 libdir = bb.data.expand('${libdir}', d)
174 libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d) 174 libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d)
175 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) 175 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)
176 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) 176 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)
177 split_staticdev_packages = do_split_packages(d, libllvm_libdir, '^lib(.*)\.a$', 'libllvm${LLVM_RELEASE}-%s-staticdev', 'Split staticdev package for %s', allow_dirs=True) 177 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)
178 if split_packages: 178 if split_packages:
179 pn = d.getVar('PN') 179 pn = d.getVar('PN')
180 d.appendVar('RDEPENDS_' + pn, ' '+' '.join(split_packages)) 180 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}/*"
19 19
20python populate_packages_prepend () { 20python populate_packages_prepend () {
21 libdir = d.expand('${libdir}') 21 libdir = d.expand('${libdir}')
22 do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True) 22 do_split_packages(d, libdir, r'^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
23} 23}
24 24
25do_compile_prepend_class-native () { 25do_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() {
46 # do_split_packages requires a pair of () in the regex, but we have nothing 46 # do_split_packages requires a pair of () in the regex, but we have nothing
47 # to match, so use an empty pair. 47 # to match, so use an empty pair.
48 if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d): 48 if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
49 do_split_packages(d, d.expand('${libdir}/perl/${PV}'), '.*\.t()', 49 do_split_packages(d, d.expand('${libdir}/perl/${PV}'), r'.*\.t()',
50 '${PN}-ptest%s', '%s', recursive=True, match_path=True) 50 '${PN}-ptest%s', '%s', recursive=True, match_path=True)
51} 51}
52 52
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 "
222 222
223python split_perl_packages () { 223python split_perl_packages () {
224 libdir = d.expand('${libdir}/perl5/${PV}') 224 libdir = d.expand('${libdir}/perl5/${PV}')
225 do_split_packages(d, libdir, '.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False) 225 do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
226 do_split_packages(d, libdir, '.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) 226 do_split_packages(d, libdir, r'.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
227 do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) 227 do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
228 do_split_packages(d, libdir, 'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) 228 do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
229 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) 229 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)
230 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) 230 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)
231 231
232 # perl-modules should recommend every perl module, and only the 232 # perl-modules should recommend every perl module, and only the
233 # modules. Don't attempt to use the result of do_split_packages() as some 233 # modules. Don't attempt to use the result of do_split_packages() as some
diff --git a/meta/recipes-extended/iptables/iptables_1.6.2.bb b/meta/recipes-extended/iptables/iptables_1.6.2.bb
index e00824f763..a57cac34eb 100644
--- a/meta/recipes-extended/iptables/iptables_1.6.2.bb
+++ b/meta/recipes-extended/iptables/iptables_1.6.2.bb
@@ -39,7 +39,7 @@ PACKAGES += "${PN}-modules"
39PACKAGES_DYNAMIC += "^${PN}-module-.*" 39PACKAGES_DYNAMIC += "^${PN}-module-.*"
40 40
41python populate_packages_prepend() { 41python populate_packages_prepend() {
42 modules = do_split_packages(d, '${libdir}/xtables', 'lib(.*)\.so$', '${PN}-module-%s', '${PN} module %s', extra_depends='') 42 modules = do_split_packages(d, '${libdir}/xtables', r'lib(.*)\.so$', '${PN}-module-%s', '${PN} module %s', extra_depends='')
43 if modules: 43 if modules:
44 metapkg = d.getVar('PN') + '-modules' 44 metapkg = d.getVar('PN') + '-modules'
45 d.appendVar('RDEPENDS_' + metapkg, ' ' + ' '.join(modules)) 45 d.appendVar('RDEPENDS_' + metapkg, ' ' + ' '.join(modules))
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.52.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.52.bb
index adf77598d8..fb76a8bbb1 100644
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.52.bb
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.52.bb
@@ -81,5 +81,5 @@ PACKAGES_DYNAMIC += "^lighttpd-module-.*"
81 81
82python populate_packages_prepend () { 82python populate_packages_prepend () {
83 lighttpd_libdir = d.expand('${libdir}') 83 lighttpd_libdir = d.expand('${libdir}')
84 do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') 84 do_split_packages(d, lighttpd_libdir, r'^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
85} 85}
diff --git a/meta/recipes-extended/pam/libpam_1.3.0.bb b/meta/recipes-extended/pam/libpam_1.3.0.bb
index 3aec2cdb4c..5c45460c3a 100644
--- a/meta/recipes-extended/pam/libpam_1.3.0.bb
+++ b/meta/recipes-extended/pam/libpam_1.3.0.bb
@@ -120,7 +120,7 @@ python populate_packages_prepend () {
120 pam_filterdir = d.expand('${base_libdir}/security/pam_filter') 120 pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
121 pam_pkgname = mlprefix + 'pam-plugin%s' 121 pam_pkgname = mlprefix + 'pam-plugin%s'
122 122
123 do_split_packages(d, pam_libdir, '^pam(.*)\.so$', pam_pkgname, 123 do_split_packages(d, pam_libdir, r'^pam(.*)\.so$', pam_pkgname,
124 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='') 124 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
125 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd') 125 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
126 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update') 126 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
@@ -129,7 +129,7 @@ python populate_packages_prepend () {
129 pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check') 129 pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
130 pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper') 130 pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
131 pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply') 131 pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply')
132 do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') 132 do_split_packages(d, pam_filterdir, r'^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
133} 133}
134 134
135do_install() { 135do_install() {
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb
index 99c84c6dda..e4f2eee976 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb
@@ -69,7 +69,7 @@ python populate_packages_prepend () {
69 69
70 loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') 70 loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
71 71
72 packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) 72 packages = ' '.join(do_split_packages(d, loaders_root, r'^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
73 d.setVar('PIXBUF_PACKAGES', packages) 73 d.setVar('PIXBUF_PACKAGES', packages)
74 74
75 # The test suite exercises all the loaders, so ensure they are all 75 # The test suite exercises all the loaders, so ensure they are all
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc
index 519a9840f4..1b0829de07 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -123,11 +123,11 @@ python populate_packages_prepend () {
123 immodules_root = os.path.join(gtk_libdir, 'immodules') 123 immodules_root = os.path.join(gtk_libdir, 'immodules')
124 printmodules_root = os.path.join(gtk_libdir, 'printbackends'); 124 printmodules_root = os.path.join(gtk_libdir, 'printbackends');
125 125
126 immodules = do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s') 126 immodules = do_split_packages(d, immodules_root, r'^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')
127 if immodules: 127 if immodules:
128 d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules)) 128 d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules))
129 129
130 do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') 130 do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
131 131
132 if (d.getVar('DEBIAN_NAMES')): 132 if (d.getVar('DEBIAN_NAMES')):
133 d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-3.0') 133 d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-3.0')
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb
index 89fca736b2..682d31e49e 100644
--- a/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb
+++ b/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb
@@ -27,8 +27,8 @@ python populate_packages_prepend () {
27 immodules_root = os.path.join(gtk_libdir, 'immodules') 27 immodules_root = os.path.join(gtk_libdir, 'immodules')
28 printmodules_root = os.path.join(gtk_libdir, 'printbackends'); 28 printmodules_root = os.path.join(gtk_libdir, 'printbackends');
29 29
30 d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s'))) 30 d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, r'^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
31 do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s') 31 do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
32 32
33 if (d.getVar('DEBIAN_NAMES')): 33 if (d.getVar('DEBIAN_NAMES')):
34 d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0') 34 d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
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() {
194 dri_pkgs = os.listdir(dri_drivers_root) 194 dri_pkgs = os.listdir(dri_drivers_root)
195 lib_name = d.expand("${MLPREFIX}mesa-megadriver") 195 lib_name = d.expand("${MLPREFIX}mesa-megadriver")
196 for p in dri_pkgs: 196 for p in dri_pkgs:
197 m = re.match('^(.*)_dri\.so$', p) 197 m = re.match(r'^(.*)_dri\.so$', p)
198 if m: 198 if m:
199 pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1)) 199 pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
200 d.appendVar("RPROVIDES_%s" % lib_name, pkg_name) 200 d.appendVar("RPROVIDES_%s" % lib_name, pkg_name)
@@ -202,7 +202,7 @@ python mesa_populate_packages() {
202 d.appendVar("RREPLACES_%s" % lib_name, pkg_name) 202 d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
203 203
204 pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe") 204 pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe")
205 do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='') 205 do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
206} 206}
207 207
208PACKAGESPLITFUNCS_prepend = "mesa_populate_packages " 208PACKAGESPLITFUNCS_prepend = "mesa_populate_packages "
diff --git a/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb b/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb
index d8cee510ca..84303e6246 100644
--- a/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb
+++ b/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb
@@ -35,5 +35,5 @@ REQUIRED_DISTRO_FEATURES_class-native = ""
35export PYTHON = "python3" 35export PYTHON = "python3"
36 36
37python populate_packages_prepend () { 37python populate_packages_prepend () {
38 do_split_packages(d, '${libdir}', '^libxcb-(.*)\.so\..*$', 'libxcb-%s', 'XCB library module for %s', allow_links=True) 38 do_split_packages(d, '${libdir}', r'^libxcb-(.*)\.so\..*$', 'libxcb-%s', 'XCB library module for %s', allow_links=True)
39} 39}
diff --git a/meta/recipes-multimedia/alsa/alsa-plugins_1.1.6.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.1.6.bb
index 17c1879f95..7ede8be98a 100644
--- a/meta/recipes-multimedia/alsa/alsa-plugins_1.1.6.bb
+++ b/meta/recipes-multimedia/alsa/alsa-plugins_1.1.6.bb
@@ -60,7 +60,7 @@ do_install_append() {
60 60
61python populate_packages_prepend() { 61python populate_packages_prepend() {
62 plugindir = d.expand('${libdir}/alsa-lib/') 62 plugindir = d.expand('${libdir}/alsa-lib/')
63 packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='')) 63 packages = " ".join(do_split_packages(d, plugindir, r'^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
64 d.setVar("RDEPENDS_alsa-plugins", packages) 64 d.setVar("RDEPENDS_alsa-plugins", packages)
65} 65}
66 66
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
index 3fdb10e404..c995e29e09 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
@@ -6,11 +6,11 @@ python split_gstreamer10_packages () {
6 postinst = d.getVar('plugin_postinst') 6 postinst = d.getVar('plugin_postinst')
7 glibdir = d.getVar('libdir') 7 glibdir = d.getVar('libdir')
8 8
9 do_split_packages(d, glibdir, '^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True) 9 do_split_packages(d, glibdir, r'^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True)
10 do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends='') 10 do_split_packages(d, gst_libdir, r'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends='')
11 do_split_packages(d, glibdir+'/girepository-1.0', 'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer typelib file for %s', postinst=postinst, extra_depends='') 11 do_split_packages(d, glibdir+'/girepository-1.0', r'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer typelib file for %s', postinst=postinst, extra_depends='')
12 do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends='${PN}-dev') 12 do_split_packages(d, gst_libdir, r'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends='${PN}-dev')
13 do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends='${PN}-staticdev') 13 do_split_packages(d, gst_libdir, r'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends='${PN}-staticdev')
14} 14}
15 15
16python set_metapkg_rdepends () { 16python set_metapkg_rdepends () {
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 8c58c37248..9a95e7c65b 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -211,8 +211,8 @@ pkg_postinst_${PN}-server() {
211 211
212python populate_packages_prepend() { 212python populate_packages_prepend() {
213 plugindir = d.expand('${libdir}/pulse-${PV}/modules/') 213 plugindir = d.expand('${libdir}/pulse-${PV}/modules/')
214 do_split_packages(d, plugindir, '^module-(.*)\.so$', '${PN}-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True) 214 do_split_packages(d, plugindir, r'^module-(.*)\.so$', '${PN}-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True)
215 do_split_packages(d, plugindir, '^lib(.*)\.so$', '${PN}-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True) 215 do_split_packages(d, plugindir, r'^lib(.*)\.so$', '${PN}-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True)
216} 216}
217 217
218RDEPENDS_pulseaudio-server = " \ 218RDEPENDS_pulseaudio-server = " \