aboutsummaryrefslogtreecommitdiffstats
path: root/tools/checklicenses.py
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-10-15 22:08:48 +0200
committerPeter Wu <peter@lekensteyn.nl>2018-10-16 08:25:43 +0000
commit84fd2d79682278927ce07361d901faed35bd1202 (patch)
tree812afeded7d5d02eb9eeb73e73daa28b077f2f18 /tools/checklicenses.py
parent3cb6c95e633019111556706357652304fb8a1139 (diff)
licensecheck: fix detection of multiple licenses
licensecheck.pl: by the time the second license is evaluated, the $2 variable was already invalidated. Fix that and make it possible for checklicenses.py to check for multiple license choices. Change-Id: I8e9e788c33ccd64e85839c82924e28a504f6ae8f Reviewed-on: https://code.wireshark.org/review/30223 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'tools/checklicenses.py')
-rwxr-xr-xtools/checklicenses.py43
1 files changed, 2 insertions, 41 deletions
diff --git a/tools/checklicenses.py b/tools/checklicenses.py
index 58e75671cd..b52c94627b 100755
--- a/tools/checklicenses.py
+++ b/tools/checklicenses.py
@@ -108,15 +108,9 @@ PATH_SPECIFIC_WHITELISTED_LICENSES = {
'epan/dfilter/grammar.c': [
'UNKNOWN',
],
- 'epan/dissectors/packet-dtn.c': [
- 'GPL (v2 or later) GPL (v2 or later)' # TODO: make licensecheck handle this better
- ],
'epan/dissectors/packet-ieee80211-radiotap-iter.': [ # Using ISC license only
'ISC GPL (v2)'
],
- 'epan/dissectors/packet-ppi.c': [ # Using BSD (3 clause) license
- 'BSD (3 clause) GPL (v2)'
- ],
'plugins/mate/mate_grammar.h': [
'UNKNOWN',
],
@@ -156,40 +150,6 @@ PATH_SPECIFIC_WHITELISTED_LICENSES = {
'ui/gtk/wireshark-gresources.c': [
'UNKNOWN',
],
- # The airpcap code is using BSD (3 clause)
- 'epan/crypt/dot11decrypt_interop.h': [
- 'BSD (3 clause) GPL (v2)'
- ],
- 'epan/crypt/dot11decrypt_tkip.c': [
- 'BSD (3 clause) GPL (v2)'
- ],
- 'epan/crypt/dot11decrypt_ws.h': [
- 'BSD (3 clause) GPL (v2)'
- ],
- 'epan/crypt/wep-wpadefs.h': [
- 'BSD (3 clause) GPL (v2)'
- ],
- 'epan/crypt/dot11decrypt_system.h': [
- 'BSD (3 clause) GPL (v2)'
- ],
- 'epan/crypt/dot11decrypt_user.h': [
- 'BSD (3 clause) GPL (v2)'
- ],
- 'epan/crypt/dot11decrypt_ccmp.c': [
- 'BSD (3 clause) GPL (v2)'
- ],
- 'epan/crypt/dot11decrypt_int.h': [
- 'BSD (3 clause) GPL (v2)'
- ],
- 'epan/crypt/dot11decrypt.c': [
- 'BSD (3 clause) GPL (v2)'
- ],
- 'epan/crypt/dot11decrypt_debug.h': [
- 'BSD (3 clause) GPL (v2)'
- ],
- 'wsutil/dot11decrypt_wep.c': [
- 'BSD (3 clause) GPL (v2)'
- ],
}
def check_licenses(options, args):
@@ -252,7 +212,8 @@ def check_licenses(options, args):
if 'GENERATED FILE' in license:
continue
- if license in WHITELISTED_LICENSES:
+ # Support files which provide a choice between licenses.
+ if any(item in WHITELISTED_LICENSES for item in license.split(';')):
continue
if not options.ignore_suppressions: