aboutsummaryrefslogtreecommitdiffstats
path: root/tools/checklicenses.py
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2020-06-08 16:19:57 -0700
committerGerald Combs <gerald@wireshark.org>2020-06-10 18:12:50 +0000
commitf8d464f4358649f8a5f80b41a50eafedc612fba5 (patch)
tree6e1ae6bc53218da4a51dd36da3ed5216f4e52008 /tools/checklicenses.py
parent5a7b949398b93d3d726c81753b460e5ce6bbd2f3 (diff)
checklicenses: Add a --list-allowed option.
Add an option to list our allowed licenses. Remove a couple of GTK+ entries while we're here. Change-Id: I1c8cf3314cff369766f1ba25438f16c69f42a1ba Reviewed-on: https://code.wireshark.org/review/37409 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'tools/checklicenses.py')
-rwxr-xr-xtools/checklicenses.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/checklicenses.py b/tools/checklicenses.py
index dda74ed3ab..3e1b04a5b8 100755
--- a/tools/checklicenses.py
+++ b/tools/checklicenses.py
@@ -21,6 +21,8 @@ def PrintUsage():
--ignore-suppressions Ignores path-specific allowed license. Useful when
trying to remove a suppression/allowed entry.
+ --list-allowed Print a list of allowed licenses and exit.
+
tocheck Specifies the directory, relative to root, to check. This defaults
to "." so it checks everything.
@@ -143,16 +145,13 @@ PATH_SPECIFIC_ALLOWED_LICENSES = {
'tools/licensecheck.pl': [
'GPL (v2)'
],
- # Generated files for GTK pixbuf binary bundling
- 'ui/gtk/wireshark-gresources.h': [
- 'UNKNOWN',
- ],
- 'ui/gtk/wireshark-gresources.c': [
- 'UNKNOWN',
- ],
}
def check_licenses(options, args):
+ if options.list_allowed:
+ print('\n'.join(ALLOWED_LICENSES))
+ sys.exit(0)
+
# Figure out which directory we have to check.
if len(args) == 0:
# No directory to check specified, use the repository root.
@@ -250,6 +249,10 @@ def main():
'will normally be the repository root.')
option_parser.add_option('-v', '--verbose', action='store_true',
default=False, help='Print debug logging')
+ option_parser.add_option('--list-allowed',
+ action='store_true',
+ default=False,
+ help='Print a list of allowed licenses and exit.')
option_parser.add_option('--ignore-suppressions',
action='store_true',
default=False,