Update buildroot & docker (#25)

* Update docker & buildroot

* Fix

* fix versions
This commit is contained in:
Pascal Vizeli
2018-05-28 14:58:22 +02:00
committed by GitHub
parent 7db3226a8e
commit b13086072c
1887 changed files with 22062 additions and 18015 deletions

View File

@@ -4,6 +4,7 @@
from __future__ import print_function
import argparse
import inspect
import os
import re
import sys
@@ -24,6 +25,9 @@ def parse_args():
parser.add_argument("files", metavar="F", type=str, nargs="*",
help="list of files")
parser.add_argument("--br2-external", "-b", dest='intree_only', action="store_false",
help="do not apply the pathname filters used for intree files")
parser.add_argument("--manual-url", action="store",
default="http://nightly.buildroot.org/",
help="default: %(default)s")
@@ -40,13 +44,33 @@ def parse_args():
return parser.parse_args()
CONFIG_IN_FILENAME = re.compile("/Config\.\S*$")
FILE_IS_FROM_A_PACKAGE = re.compile("package/[^/]*/")
CONFIG_IN_FILENAME = re.compile("Config\.\S*$")
DO_CHECK_INTREE = re.compile("|".join([
"Config.in",
"arch/",
"boot/",
"fs/",
"linux/",
"package/",
"system/",
"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$",
]))
def get_lib_from_filename(fname):
if FILE_IS_FROM_A_PACKAGE.search(fname) is None:
return None
if flags.intree_only:
if DO_CHECK_INTREE.match(fname) is None:
return None
if DO_NOT_CHECK_INTREE.match(fname):
return None
if CONFIG_IN_FILENAME.search(fname):
return checkpackagelib.lib_config
if fname.endswith(".hash"):
@@ -117,7 +141,16 @@ def __main__():
global flags
flags = parse_args()
if len(flags.files) == 0:
if flags.intree_only:
# change all paths received to be relative to the base dir
base_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
files_to_check = [os.path.relpath(os.path.abspath(f), base_dir) for f in flags.files]
# move current dir so the script find the files
os.chdir(base_dir)
else:
files_to_check = flags.files
if len(files_to_check) == 0:
print("No files to check style")
sys.exit(1)
@@ -125,7 +158,7 @@ def __main__():
total_warnings = 0
total_lines = 0
for fname in flags.files:
for fname in files_to_check:
nwarnings, nlines = check_file_using_lib(fname)
total_warnings += nwarnings
total_lines += nlines