From 84fd2d79682278927ce07361d901faed35bd1202 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 15 Oct 2018 22:08:48 +0200 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo Reviewed-by: Peter Wu --- tools/checklicenses.py | 43 ++----------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) (limited to 'tools/checklicenses.py') 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: -- cgit v1.2.3