From 87009cdc1b35968c61317dfe5375f5126ec44918 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Thu, 19 Jan 2023 13:39:20 +0000 Subject: Don't add duplicate license keys Don't add a custom keys to license_expression's database, if it's already present. Also drop unneeded 'XVIEW' license. --- calm/hint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calm/hint.py b/calm/hint.py index 6034c1d..1ec86d9 100755 --- a/calm/hint.py +++ b/calm/hint.py @@ -39,10 +39,10 @@ else: extra_licenses = [ 'Linux-man-pages-copyleft', # requires SPDX license-list 3.15 'Public-Domain', - 'XVIEW', ] for l in extra_licenses: - json.append({"spdx_license_key": l}) + if not any(j["spdx_license_key"] == l for j in json): + json.append({"spdx_license_key": l}) licensing = license_expression.build_spdx_licensing(json) # types of key: -- cgit v1.2.3