Update buildroot to 2020.02.7 (#923)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
committed by
Stefan Agner
parent
f9c29ef209
commit
e43d4cd632
@@ -46,24 +46,24 @@ def parse_args():
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
CONFIG_IN_FILENAME = re.compile("Config\.\S*$")
|
||||
DO_CHECK_INTREE = re.compile("|".join([
|
||||
"Config.in",
|
||||
"arch/",
|
||||
"boot/",
|
||||
"fs/",
|
||||
"linux/",
|
||||
"package/",
|
||||
"system/",
|
||||
"toolchain/",
|
||||
CONFIG_IN_FILENAME = re.compile(r"Config\.\S*$")
|
||||
DO_CHECK_INTREE = re.compile(r"|".join([
|
||||
r"Config.in",
|
||||
r"arch/",
|
||||
r"boot/",
|
||||
r"fs/",
|
||||
r"linux/",
|
||||
r"package/",
|
||||
r"system/",
|
||||
r"toolchain/",
|
||||
]))
|
||||
DO_NOT_CHECK_INTREE = re.compile("|".join([
|
||||
"boot/barebox/barebox\.mk$",
|
||||
"fs/common\.mk$",
|
||||
"package/doc-asciidoc\.mk$",
|
||||
"package/pkg-\S*\.mk$",
|
||||
"toolchain/helpers\.mk$",
|
||||
"toolchain/toolchain-external/pkg-toolchain-external\.mk$",
|
||||
DO_NOT_CHECK_INTREE = re.compile(r"|".join([
|
||||
r"boot/barebox/barebox\.mk$",
|
||||
r"fs/common\.mk$",
|
||||
r"package/doc-asciidoc\.mk$",
|
||||
r"package/pkg-\S*\.mk$",
|
||||
r"toolchain/helpers\.mk$",
|
||||
r"toolchain/toolchain-external/pkg-toolchain-external\.mk$",
|
||||
]))
|
||||
|
||||
|
||||
|
||||
@@ -152,8 +152,8 @@ class CommentsMenusPackagesOrder(_CheckFunction):
|
||||
|
||||
|
||||
class HelpText(_CheckFunction):
|
||||
HELP_TEXT_FORMAT = re.compile("^\t .{,62}$")
|
||||
URL_ONLY = re.compile("^(http|https|git)://\S*$")
|
||||
HELP_TEXT_FORMAT = re.compile(r"^\t .{,62}$")
|
||||
URL_ONLY = re.compile(r"^(http|https|git)://\S*$")
|
||||
|
||||
def before(self):
|
||||
self.help_text = False
|
||||
|
||||
@@ -20,12 +20,12 @@ end_conditional = ["endif"]
|
||||
|
||||
|
||||
class Indent(_CheckFunction):
|
||||
COMMENT = re.compile("^\s*#")
|
||||
CONDITIONAL = re.compile("^\s*({})\s".format("|".join(start_conditional + end_conditional)))
|
||||
COMMENT = re.compile(r"^\s*#")
|
||||
CONDITIONAL = re.compile(r"^\s*({})\s".format("|".join(start_conditional + end_conditional)))
|
||||
ENDS_WITH_BACKSLASH = re.compile(r"^[^#].*\\$")
|
||||
END_DEFINE = re.compile("^\s*endef\s")
|
||||
MAKEFILE_TARGET = re.compile("^[^# \t]+:\s")
|
||||
START_DEFINE = re.compile("^\s*define\s")
|
||||
END_DEFINE = re.compile(r"^\s*endef\s")
|
||||
MAKEFILE_TARGET = re.compile(r"^[^# \t]+:\s")
|
||||
START_DEFINE = re.compile(r"^\s*define\s")
|
||||
|
||||
def before(self):
|
||||
self.define = False
|
||||
@@ -76,17 +76,17 @@ class Indent(_CheckFunction):
|
||||
|
||||
|
||||
class OverriddenVariable(_CheckFunction):
|
||||
CONCATENATING = re.compile("^([A-Z0-9_]+)\s*(\+|:|)=\s*\$\(\\1\)")
|
||||
END_CONDITIONAL = re.compile("^\s*({})".format("|".join(end_conditional)))
|
||||
CONCATENATING = re.compile(r"^([A-Z0-9_]+)\s*(\+|:|)=\s*\$\(\\1\)")
|
||||
END_CONDITIONAL = re.compile(r"^\s*({})".format("|".join(end_conditional)))
|
||||
OVERRIDING_ASSIGNMENTS = [':=', "="]
|
||||
START_CONDITIONAL = re.compile("^\s*({})".format("|".join(start_conditional)))
|
||||
VARIABLE = re.compile("^([A-Z0-9_]+)\s*((\+|:|)=)")
|
||||
USUALLY_OVERRIDDEN = re.compile("^[A-Z0-9_]+({})".format("|".join([
|
||||
"_ARCH\s*=\s*",
|
||||
"_CPU\s*=\s*",
|
||||
"_SITE\s*=\s*",
|
||||
"_SOURCE\s*=\s*",
|
||||
"_VERSION\s*=\s*"])))
|
||||
START_CONDITIONAL = re.compile(r"^\s*({})".format("|".join(start_conditional)))
|
||||
VARIABLE = re.compile(r"^([A-Z0-9_]+)\s*((\+|:|)=)")
|
||||
USUALLY_OVERRIDDEN = re.compile(r"^[A-Z0-9_]+({})".format("|".join([
|
||||
r"_ARCH\s*=\s*",
|
||||
r"_CPU\s*=\s*",
|
||||
r"_SITE\s*=\s*",
|
||||
r"_SOURCE\s*=\s*",
|
||||
r"_VERSION\s*=\s*"])))
|
||||
|
||||
def before(self):
|
||||
self.conditional = 0
|
||||
@@ -174,7 +174,7 @@ class RemoveDefaultPackageSourceVariable(_CheckFunction):
|
||||
package_upper = package.replace("-", "_").upper()
|
||||
self.package = package
|
||||
self.FIND_SOURCE = re.compile(
|
||||
"^{}_SOURCE\s*=\s*{}-\$\({}_VERSION\)\.tar\.gz"
|
||||
r"^{}_SOURCE\s*=\s*{}-\$\({}_VERSION\)\.tar\.gz"
|
||||
.format(package_upper, package, package_upper))
|
||||
|
||||
def check_line(self, lineno, text):
|
||||
@@ -222,7 +222,7 @@ class TrailingBackslash(_CheckFunction):
|
||||
|
||||
|
||||
class TypoInPackageVariable(_CheckFunction):
|
||||
ALLOWED = re.compile("|".join([
|
||||
ALLOWED = re.compile(r"|".join([
|
||||
"ACLOCAL_DIR",
|
||||
"ACLOCAL_HOST_DIR",
|
||||
"ACLOCAL_PATH",
|
||||
@@ -241,7 +241,7 @@ class TypoInPackageVariable(_CheckFunction):
|
||||
"TARGET_FINALIZE_HOOKS",
|
||||
"TARGETS_ROOTFS",
|
||||
"XTENSA_CORE_NAME"]))
|
||||
VARIABLE = re.compile("^([A-Z0-9_]+_[A-Z0-9_]+)\s*(\+|)=")
|
||||
VARIABLE = re.compile(r"^([A-Z0-9_]+_[A-Z0-9_]+)\s*(\+|)=")
|
||||
|
||||
def before(self):
|
||||
package, _ = os.path.splitext(os.path.basename(self.filename))
|
||||
@@ -251,9 +251,9 @@ class TypoInPackageVariable(_CheckFunction):
|
||||
# linux extensions do not use LINUX_EXT_ prefix for variables
|
||||
package = package.replace("LINUX_EXT_", "")
|
||||
self.package = package
|
||||
self.REGEX = re.compile("^(HOST_|ROOTFS_)?({}_[A-Z0-9_]+)".format(package))
|
||||
self.REGEX = re.compile(r"^(HOST_|ROOTFS_)?({}_[A-Z0-9_]+)".format(package))
|
||||
self.FIND_VIRTUAL = re.compile(
|
||||
"^{}_PROVIDES\s*(\+|)=\s*(.*)".format(package))
|
||||
r"^{}_PROVIDES\s*(\+|)=\s*(.*)".format(package))
|
||||
self.virtual = []
|
||||
|
||||
def check_line(self, lineno, text):
|
||||
@@ -281,16 +281,16 @@ class TypoInPackageVariable(_CheckFunction):
|
||||
|
||||
|
||||
class UselessFlag(_CheckFunction):
|
||||
DEFAULT_AUTOTOOLS_FLAG = re.compile("^.*{}".format("|".join([
|
||||
"_AUTORECONF\s*=\s*NO",
|
||||
"_LIBTOOL_PATCH\s*=\s*YES"])))
|
||||
DEFAULT_GENERIC_FLAG = re.compile("^.*{}".format("|".join([
|
||||
"_INSTALL_IMAGES\s*=\s*NO",
|
||||
"_INSTALL_REDISTRIBUTE\s*=\s*YES",
|
||||
"_INSTALL_STAGING\s*=\s*NO",
|
||||
"_INSTALL_TARGET\s*=\s*YES"])))
|
||||
END_CONDITIONAL = re.compile("^\s*({})".format("|".join(end_conditional)))
|
||||
START_CONDITIONAL = re.compile("^\s*({})".format("|".join(start_conditional)))
|
||||
DEFAULT_AUTOTOOLS_FLAG = re.compile(r"^.*{}".format("|".join([
|
||||
r"_AUTORECONF\s*=\s*NO",
|
||||
r"_LIBTOOL_PATCH\s*=\s*YES"])))
|
||||
DEFAULT_GENERIC_FLAG = re.compile(r"^.*{}".format("|".join([
|
||||
r"_INSTALL_IMAGES\s*=\s*NO",
|
||||
r"_INSTALL_REDISTRIBUTE\s*=\s*YES",
|
||||
r"_INSTALL_STAGING\s*=\s*NO",
|
||||
r"_INSTALL_TARGET\s*=\s*YES"])))
|
||||
END_CONDITIONAL = re.compile(r"^\s*({})".format("|".join(end_conditional)))
|
||||
START_CONDITIONAL = re.compile(r"^\s*({})".format("|".join(start_conditional)))
|
||||
|
||||
def before(self):
|
||||
self.conditional = 0
|
||||
|
||||
@@ -11,7 +11,7 @@ from checkpackagelib.lib import NewlineAtEof # noqa: F401
|
||||
|
||||
|
||||
class ApplyOrder(_CheckFunction):
|
||||
APPLY_ORDER = re.compile("\d{1,4}-[^/]*$")
|
||||
APPLY_ORDER = re.compile(r"\d{1,4}-[^/]*$")
|
||||
|
||||
def before(self):
|
||||
if not self.APPLY_ORDER.match(os.path.basename(self.filename)):
|
||||
@@ -21,7 +21,7 @@ class ApplyOrder(_CheckFunction):
|
||||
|
||||
|
||||
class NumberedSubject(_CheckFunction):
|
||||
NUMBERED_PATCH = re.compile("Subject:\s*\[PATCH\s*\d+/\d+\]")
|
||||
NUMBERED_PATCH = re.compile(r"Subject:\s*\[PATCH\s*\d+/\d+\]")
|
||||
|
||||
def before(self):
|
||||
self.git_patch = False
|
||||
@@ -44,7 +44,7 @@ class NumberedSubject(_CheckFunction):
|
||||
|
||||
|
||||
class Sob(_CheckFunction):
|
||||
SOB_ENTRY = re.compile("^Signed-off-by: .*$")
|
||||
SOB_ENTRY = re.compile(r"^Signed-off-by: .*$")
|
||||
|
||||
def before(self):
|
||||
self.found = False
|
||||
|
||||
@@ -10,7 +10,7 @@ import unittest
|
||||
# Patch parsing functions
|
||||
#
|
||||
|
||||
FIND_INFRA_IN_PATCH = re.compile("^\+\$\(eval \$\((host-)?([^-]*)-package\)\)$")
|
||||
FIND_INFRA_IN_PATCH = re.compile(r"^\+\$\(eval \$\((host-)?([^-]*)-package\)\)$")
|
||||
|
||||
|
||||
def analyze_patch(patch):
|
||||
@@ -33,7 +33,7 @@ def analyze_patch(patch):
|
||||
return (files, infras)
|
||||
|
||||
|
||||
FIND_INFRA_IN_MK = re.compile("^\$\(eval \$\((host-)?([^-]*)-package\)\)$")
|
||||
FIND_INFRA_IN_MK = re.compile(r"^\$\(eval \$\((host-)?([^-]*)-package\)\)$")
|
||||
|
||||
|
||||
def fname_get_package_infra(fname):
|
||||
@@ -178,7 +178,7 @@ def parse_arches_from_config_in(fname):
|
||||
parsing_arches = True
|
||||
continue
|
||||
if parsing_arches:
|
||||
m = re.match("^\s*default \"([^\"]*)\".*", line)
|
||||
m = re.match(r"^\s*default \"([^\"]*)\".*", line)
|
||||
if m:
|
||||
arches.add(m.group(1))
|
||||
else:
|
||||
@@ -192,7 +192,7 @@ def parse_developer_architectures(fnames):
|
||||
developer is working on."""
|
||||
arches = set()
|
||||
for fname in fnames:
|
||||
if not re.match("^.*/arch/Config\.in\..*$", fname):
|
||||
if not re.match(r"^.*/arch/Config\.in\..*$", fname):
|
||||
continue
|
||||
arches = arches | parse_arches_from_config_in(fname)
|
||||
return arches
|
||||
@@ -201,7 +201,7 @@ def parse_developer_architectures(fnames):
|
||||
def parse_developer_infras(fnames):
|
||||
infras = set()
|
||||
for fname in fnames:
|
||||
m = re.match("^package/pkg-([^.]*).mk$", fname)
|
||||
m = re.match(r"^package/pkg-([^.]*).mk$", fname)
|
||||
if m:
|
||||
infras.add(m.group(1))
|
||||
return infras
|
||||
|
||||
@@ -96,10 +96,10 @@ def pkg_buildroot_name(pkg_name):
|
||||
Keyword arguments:
|
||||
pkg_name -- String to rename
|
||||
"""
|
||||
name = re.sub('[^\w-]', '', pkg_name.lower())
|
||||
name = re.sub(r'[^\w-]', '', pkg_name.lower())
|
||||
name = name.replace('_', '-')
|
||||
prefix = 'python-'
|
||||
pattern = re.compile('^(?!' + prefix + ')(.+?)$')
|
||||
pattern = re.compile(r'^(?!' + prefix + ')(.+?)$')
|
||||
name = pattern.sub(r'python-\1', name)
|
||||
return name
|
||||
|
||||
@@ -337,7 +337,7 @@ class BuildrootPackage():
|
||||
self.pkg_req = None
|
||||
return set()
|
||||
self.pkg_req = self.setup_metadata['install_requires']
|
||||
self.pkg_req = [re.sub('([-.\w]+).*', r'\1', req)
|
||||
self.pkg_req = [re.sub(r'([-.\w]+).*', r'\1', req)
|
||||
for req in self.pkg_req]
|
||||
|
||||
# get rid of commented lines and also strip the package strings
|
||||
@@ -451,7 +451,7 @@ class BuildrootPackage():
|
||||
"Mozilla Public License 2.0": "MPL-2.0",
|
||||
"Zope Public License": "ZPL"
|
||||
}
|
||||
regexp = re.compile('^License :* *.* *:+ (.*)( \(.*\))?$')
|
||||
regexp = re.compile(r'^License :* *.* *:+ (.*)( \(.*\))?$')
|
||||
classifiers_licenses = [regexp.sub(r"\1", lic)
|
||||
for lic in self.metadata['info']['classifiers']
|
||||
if regexp.match(lic)]
|
||||
|
||||
Reference in New Issue
Block a user