Commit fde5e903 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

scripts/spdxcheck.py: work with current HEAD LICENSES/ directory

Depending on how old your -next tree is, it may not have a master that
has the LICENSES directory.

Change the lookup to HEAD and find whatever LICENSE directory files are
used in that branch.

Miscellanea:

 - Remove the checkpatch test as it will have its own SPDX license
   identifier.

Link: http://lkml.kernel.org/r/7eeefc862194930c773e662cb2152e178441d3b8.camel@perches.comSigned-off-by: default avatarJoe Perches <joe@perches.com>
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f08957d0
...@@ -32,7 +32,7 @@ def read_spdxdata(repo): ...@@ -32,7 +32,7 @@ def read_spdxdata(repo):
# The subdirectories of LICENSES in the kernel source # The subdirectories of LICENSES in the kernel source
license_dirs = [ "preferred", "other", "exceptions" ] license_dirs = [ "preferred", "other", "exceptions" ]
lictree = repo.heads.master.commit.tree['LICENSES'] lictree = repo.head.commit.tree['LICENSES']
spdx = SPDXdata() spdx = SPDXdata()
...@@ -199,8 +199,6 @@ def scan_git_tree(tree): ...@@ -199,8 +199,6 @@ def scan_git_tree(tree):
continue continue
if el.path.find("license-rules.rst") >= 0: if el.path.find("license-rules.rst") >= 0:
continue continue
if el.path == 'scripts/checkpatch.pl':
continue
if not os.path.isfile(el.path): if not os.path.isfile(el.path):
continue continue
parser.parse_lines(open(el.path), args.maxlines, el.path) parser.parse_lines(open(el.path), args.maxlines, el.path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment