aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/providers.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-14 15:50:51 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-14 16:12:30 +0000
commitc1fcc46e2498ddd41425d8756754f814d682aba3 (patch)
treeee8367f90ab043e192481284ddc485d372f3670a /lib/bb/providers.py
parent52a144a7daa94b2bd239d582cb71d1f03119918f (diff)
downloadbitbake-c1fcc46e2498ddd41425d8756754f814d682aba3.tar.gz
bitbake: 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/providers.py')
-rw-r--r--lib/bb/providers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/providers.py b/lib/bb/providers.py
index c2aa98c06..f496d84d1 100644
--- a/lib/bb/providers.py
+++ b/lib/bb/providers.py
@@ -129,7 +129,7 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
preferred_v = cfgData.getVar("PREFERRED_VERSION")
if preferred_v:
- m = re.match('(\d+:)*(.*)(_.*)*', preferred_v)
+ m = re.match(r'(\d+:)*(.*)(_.*)*', preferred_v)
if m:
if m.group(1):
preferred_e = m.group(1)[:-1]
@@ -384,7 +384,7 @@ def getRuntimeProviders(dataCache, rdepend):
# Only search dynamic packages if we can't find anything in other variables
for pattern in dataCache.packages_dynamic:
- pattern = pattern.replace('+', "\+")
+ pattern = pattern.replace(r'+', r"\+")
if pattern in regexp_cache:
regexp = regexp_cache[pattern]
else: