Skip to contentSkip to conversation

scripts/spdxcheck.py: Fix path to deprecated licenses

PATCH In review Sven Eckelmann 3 participants 4 messages May 11, 2019 – May 20, 2019 Licenses and spdx stuff

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/spdxcheck.py: Fix path to deprecated licenses

The directory name for other licenses was changed to "deprecated" in commit 62be257e986d ("LICENSES: Rename other to deprecated"). But it was not changed for spdxcheck.py. As result, checkpatch failed with

FAIL: "Blob or Tree named 'other' not found"
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 240, in <module>
spdx = read_spdxdata(repo)
File "scripts/spdxcheck.py", line 41, in read_spdxdata
for el in lictree[d].traverse():
File "/usr/lib/python2.7/dist-packages/git/objects/tree.py", line 298, in __getitem__
return self.join(item)
File "/usr/lib/python2.7/dist-packages/git/objects/tree.py", line 244, in join
raise KeyError(msg % file)
KeyError: "Blob or Tree named 'other' not found"

Cc Jonathan Corbet <[email protected]>
Cc Christoph Hellwig <[email protected]>
Fixes 62be257e986d ("LICENSES: Rename other to deprecated")
---
 scripts/spdxcheck.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/spdxcheck.py +1 -1
index 4fe392e507fb..1a39b34588b7 100755
@@ -32,7 +32,7 @@ class SPDXdata(object):
 def read_spdxdata(repo):
 
     # The subdirectories of LICENSES in the kernel source
-    license_dirs = [ "preferred", "other", "exceptions" ]
+    license_dirs = [ "preferred", "deprecated", "exceptions" ]
     lictree = repo.head.commit.tree['LICENSES']
 
     spdx = SPDXdata()
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 scripts/spdxcheck.py: Add dual license subdirectory

The licenses from the other directory were partially moved to the dual directory in commit 99871f2f9a4d ("scripts/spdxcheck.py: Fix path to deprecated licenses"). checkpatch therefore rejected files like drivers/staging/android/ashmem.h with

WARNING: 'SPDX-License-Identifier: GPL-2.0 OR Apache-2.0 */' is not supported in LICENSES/... #1: FILE: drivers/staging/android/ashmem.h:1:
+/* SPDX-License-Identifier: GPL-2.0 OR Apache-2.0 */

Cc Jonathan Corbet <[email protected]>
Cc Christoph Hellwig <[email protected]>
Fixes 99871f2f9a4d ("scripts/spdxcheck.py: Fix path to deprecated licenses")
---
 scripts/spdxcheck.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/spdxcheck.py +1 -1
index 1a39b34588b7..33df646618e2 100755
@@ -32,7 +32,7 @@ class SPDXdata(object):
 def read_spdxdata(repo):
 
     # The subdirectories of LICENSES in the kernel source
-    license_dirs = [ "preferred", "deprecated", "exceptions" ]
+    license_dirs = [ "preferred", "deprecated", "exceptions", "dual" ]
     lictree = repo.head.commit.tree['LICENSES']
 
     spdx = SPDXdata()
Signature · 1 line
2.20.1
#3 lore raw
In reply to Sven Eckelmann
Quoted 3 lines · On Sat, 11 May 2019 22:19:16 +0200 Sven Eckelmann <[email protected]> wrote:

The directory name for other licenses was changed to "deprecated" in commit 62be257e986d ("LICENSES: Rename other to deprecated"). But it was not changed for spdxcheck.py. As result, checkpatch failed with

Both patches applied, thanks.

jon