summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <timothy.t.orling@linux.intel.com>2020-07-10 20:48:08 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-22 22:46:37 +0100
commitabe66c9a396b465e031a620d6a3e8aa5f131b0e5 (patch)
tree743df2dd0d4e446106624a1c703f878181930579
parent227b4993067d96f55f57886fb208a243e1e65f43 (diff)
downloadpoky-abe66c9a396b465e031a620d6a3e8aa5f131b0e5.tar.gz
scripts/lib/recipetool/create.py: fix regex strings
Python now expects regex strings to be prepended with r. Silence pylint/autopep8 and similar warnings by identifying these regex patterns as... regex patterns. (From OE-Core rev: f8a5db7a6072ddb1be96405fc8b44f595275206d) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0eae98a369d80340e48dc690d09a1364cde97973) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/recipetool/create.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 8d78c5b6f9..566c75369a 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -66,7 +66,7 @@ class RecipeHandler(object):
66 libdir = d.getVar('libdir') 66 libdir = d.getVar('libdir')
67 base_libdir = d.getVar('base_libdir') 67 base_libdir = d.getVar('base_libdir')
68 libpaths = list(set([base_libdir, libdir])) 68 libpaths = list(set([base_libdir, libdir]))
69 libname_re = re.compile('^lib(.+)\.so.*$') 69 libname_re = re.compile(r'^lib(.+)\.so.*$')
70 pkglibmap = {} 70 pkglibmap = {}
71 for lib, item in shlib_providers.items(): 71 for lib, item in shlib_providers.items():
72 for path, pkg in item.items(): 72 for path, pkg in item.items():
@@ -428,7 +428,7 @@ def create_recipe(args):
428 428
429 if scriptutils.is_src_url(source): 429 if scriptutils.is_src_url(source):
430 # Warn about github archive URLs 430 # Warn about github archive URLs
431 if re.match('https?://github.com/[^/]+/[^/]+/archive/.+(\.tar\..*|\.zip)$', source): 431 if re.match(r'https?://github.com/[^/]+/[^/]+/archive/.+(\.tar\..*|\.zip)$', source):
432 logger.warning('github archive files are not guaranteed to be stable and may be re-generated over time. If the latter occurs, the checksums will likely change and the recipe will fail at do_fetch. It is recommended that you point to an actual commit or tag in the repository instead (using the repository URL in conjunction with the -S/--srcrev option).') 432 logger.warning('github archive files are not guaranteed to be stable and may be re-generated over time. If the latter occurs, the checksums will likely change and the recipe will fail at do_fetch. It is recommended that you point to an actual commit or tag in the repository instead (using the repository URL in conjunction with the -S/--srcrev option).')
433 # Fetch a URL 433 # Fetch a URL
434 fetchuri = reformat_git_uri(urldefrag(source)[0]) 434 fetchuri = reformat_git_uri(urldefrag(source)[0])
@@ -830,7 +830,7 @@ def create_recipe(args):
830 elif line.startswith('PV = '): 830 elif line.startswith('PV = '):
831 if realpv: 831 if realpv:
832 # Replace the first part of the PV value 832 # Replace the first part of the PV value
833 line = re.sub('"[^+]*\+', '"%s+' % realpv, line) 833 line = re.sub(r'"[^+]*\+', '"%s+' % realpv, line)
834 lines_before.append(line) 834 lines_before.append(line)
835 835
836 if args.also_native: 836 if args.also_native:
@@ -1066,8 +1066,8 @@ def crunch_license(licfile):
1066 import oe.utils 1066 import oe.utils
1067 1067
1068 # Note: these are carefully constructed! 1068 # Note: these are carefully constructed!
1069 license_title_re = re.compile('^\(?(#+ *)?(The )?.{1,10} [Ll]icen[sc]e( \(.{1,10}\))?\)?:?$') 1069 license_title_re = re.compile(r'^\(?(#+ *)?(The )?.{1,10} [Ll]icen[sc]e( \(.{1,10}\))?\)?:?$')
1070 license_statement_re = re.compile('^(This (project|software) is( free software)? (released|licen[sc]ed)|(Released|Licen[cs]ed)) under the .{1,10} [Ll]icen[sc]e:?$') 1070 license_statement_re = re.compile(r'^(This (project|software) is( free software)? (released|licen[sc]ed)|(Released|Licen[cs]ed)) under the .{1,10} [Ll]icen[sc]e:?$')
1071 copyright_re = re.compile('^(#+)? *Copyright .*$') 1071 copyright_re = re.compile('^(#+)? *Copyright .*$')
1072 1072
1073 crunched_md5sums = {} 1073 crunched_md5sums = {}