summaryrefslogtreecommitdiffstats
path: root/bitbake/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-16 15:35:07 +0000
commite5455662a9762fc2cb8859134d855413d84fd265 (patch)
treead7c3c6b258415ab9b92ed4b04a1ce0c2f6c9eb7 /bitbake/lib/bb/providers.py
parentca4a8eea6284aad41ec67b375c2a7c7855b5fe11 (diff)
downloadpoky-e5455662a9762fc2cb8859134d855413d84fd265.tar.gz
bitbake: 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. (Bitbake rev: c1fcc46e2498ddd41425d8756754f814d682aba3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/providers.py')
-rw-r--r--bitbake/lib/bb/providers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
index c2aa98c065..f496d84d12 100644
--- a/bitbake/lib/bb/providers.py
+++ b/bitbake/lib/bb/providers.py
@@ -129,7 +129,7 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
129 preferred_v = cfgData.getVar("PREFERRED_VERSION") 129 preferred_v = cfgData.getVar("PREFERRED_VERSION")
130 130
131 if preferred_v: 131 if preferred_v:
132 m = re.match('(\d+:)*(.*)(_.*)*', preferred_v) 132 m = re.match(r'(\d+:)*(.*)(_.*)*', preferred_v)
133 if m: 133 if m:
134 if m.group(1): 134 if m.group(1):
135 preferred_e = m.group(1)[:-1] 135 preferred_e = m.group(1)[:-1]
@@ -384,7 +384,7 @@ def getRuntimeProviders(dataCache, rdepend):
384 384
385 # Only search dynamic packages if we can't find anything in other variables 385 # Only search dynamic packages if we can't find anything in other variables
386 for pattern in dataCache.packages_dynamic: 386 for pattern in dataCache.packages_dynamic:
387 pattern = pattern.replace('+', "\+") 387 pattern = pattern.replace(r'+', r"\+")
388 if pattern in regexp_cache: 388 if pattern in regexp_cache:
389 regexp = regexp_cache[pattern] 389 regexp = regexp_cache[pattern]
390 else: 390 else: