cpan-base.bbclass: use raw string for regexp

This eliminates a deprecation warning and a future error as stipulated by
https://docs.python.org/3/library/re.html

(From OE-Core rev: 1753a8d8fd2e9d98255beb81428f70cdf3421321)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin 2021-09-17 14:59:22 +02:00 committed by Richard Purdie
parent 2697d3984f
commit 4335ee7063

View File

@ -20,7 +20,7 @@ PERLLIBDIRS:class-native = "${libdir}/perl5"
def cpan_upstream_check_pattern(d):
for x in (d.getVar('SRC_URI') or '').split(' '):
if x.startswith("https://cpan.metacpan.org"):
_pattern = x.split('/')[-1].replace(d.getVar('PV'), '(?P<pver>\d+.\d+)')
_pattern = x.split('/')[-1].replace(d.getVar('PV'), r'(?P<pver>\d+.\d+)')
return _pattern
return ''