diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-05 14:17:58 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-16 08:19:34 +0000 |
commit | e1e38c9bd16220f78068299cd90692d96d045bf9 (patch) | |
tree | 61ea2bf816f730d2d48545facdce89b020e06131 /meta/lib/oe/recipeutils.py | |
parent | 8d2dd4a30034559838e2433ad58aeffccaf40555 (diff) | |
download | poky-e1e38c9bd16220f78068299cd90692d96d045bf9.tar.gz |
lib/oe,oeqa/selftest: Fix DeprecationWarning: invalid escape sequence
Fix another load of regex escape sequence warnings for newer
python versions.
(From OE-Core rev: bd2c125bb9c362b6122e99dfdf4e1cfe12c26a90)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 92c0f65257..8f70d2eb21 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -24,7 +24,7 @@ from bb.utils import vercmp_string | |||
24 | # Help us to find places to insert values | 24 | # Help us to find places to insert values |
25 | recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LICENSE_FLAGS', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRCREV', 'SRCPV', 'SRC_URI', 'S', 'do_fetch()', 'do_unpack()', 'do_patch()', 'EXTRA_OECONF', 'EXTRA_OECMAKE', 'EXTRA_OESCONS', 'do_configure()', 'EXTRA_OEMAKE', 'do_compile()', 'do_install()', 'do_populate_sysroot()', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'populate_packages()', 'do_package()', 'do_deploy()'] | 25 | recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LICENSE_FLAGS', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRCREV', 'SRCPV', 'SRC_URI', 'S', 'do_fetch()', 'do_unpack()', 'do_patch()', 'EXTRA_OECONF', 'EXTRA_OECMAKE', 'EXTRA_OESCONS', 'do_configure()', 'EXTRA_OEMAKE', 'do_compile()', 'do_install()', 'do_populate_sysroot()', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'populate_packages()', 'do_package()', 'do_deploy()'] |
26 | # Variables that sometimes are a bit long but shouldn't be wrapped | 26 | # Variables that sometimes are a bit long but shouldn't be wrapped |
27 | nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', 'SRC_URI\[(.+\.)?md5sum\]', 'SRC_URI\[(.+\.)?sha256sum\]'] | 27 | nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', r'SRC_URI\[(.+\.)?md5sum\]', r'SRC_URI\[(.+\.)?sha256sum\]'] |
28 | list_vars = ['SRC_URI', 'LIC_FILES_CHKSUM'] | 28 | list_vars = ['SRC_URI', 'LIC_FILES_CHKSUM'] |
29 | meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION'] | 29 | meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION'] |
30 | 30 | ||
@@ -161,7 +161,7 @@ def patch_recipe_lines(fromlines, values, trailing_newline=True): | |||
161 | key = item[:-2] | 161 | key = item[:-2] |
162 | else: | 162 | else: |
163 | key = item | 163 | key = item |
164 | restr = '%s(_[a-zA-Z0-9-_$(){}]+|\[[^\]]*\])?' % key | 164 | restr = r'%s(_[a-zA-Z0-9-_$(){}]+|\[[^\]]*\])?' % key |
165 | if item.endswith('()'): | 165 | if item.endswith('()'): |
166 | recipe_progression_restrs.append(restr + '()') | 166 | recipe_progression_restrs.append(restr + '()') |
167 | else: | 167 | else: |
@@ -925,7 +925,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type): | |||
925 | sfx = '' | 925 | sfx = '' |
926 | 926 | ||
927 | if uri_type == 'git': | 927 | if uri_type == 'git': |
928 | git_regex = re.compile("(?P<pfx>v?)(?P<ver>[^\+]*)((?P<sfx>\+(git)?r?(AUTOINC\+))(?P<rev>.*))?") | 928 | git_regex = re.compile(r"(?P<pfx>v?)(?P<ver>[^\+]*)((?P<sfx>\+(git)?r?(AUTOINC\+))(?P<rev>.*))?") |
929 | m = git_regex.match(pv) | 929 | m = git_regex.match(pv) |
930 | 930 | ||
931 | if m: | 931 | if m: |
@@ -933,7 +933,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type): | |||
933 | pfx = m.group('pfx') | 933 | pfx = m.group('pfx') |
934 | sfx = m.group('sfx') | 934 | sfx = m.group('sfx') |
935 | else: | 935 | else: |
936 | regex = re.compile("(?P<pfx>(v|r)?)(?P<ver>.*)") | 936 | regex = re.compile(r"(?P<pfx>(v|r)?)(?P<ver>.*)") |
937 | m = regex.match(pv) | 937 | m = regex.match(pv) |
938 | if m: | 938 | if m: |
939 | pv = m.group('ver') | 939 | pv = m.group('ver') |