From 09638d49efc9cd0585e854fe572cf55354c7c1b7 Mon Sep 17 00:00:00 2001 From: Daksha1611 Date: Fri, 11 Sep 2026 22:55:20 +0530 Subject: [PATCH] Remove duplicate keys in alpine DECLARED_TO_SPDX #5312 DECLARED_TO_SPDX is a plain dict literal, so a repeated key silently drops the earlier entry at import time. 'as-is' and 'custom:tu-berlin-2.0' were each defined twice, leaving two mappings unreachable. Remove the unreachable entries and keep the values that currently win, so the mapping is unchanged at runtime. Which value is actually right for each of the two keys is left to the maintainers in the issue. Signed-off-by: Daksha1611 --- CHANGELOG.rst | 4 ++++ src/packagedcode/alpine.py | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cf4db410925..99b8c376014 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,10 @@ Next release - Improve copyright detection for statements with parens or trailing "authors" +- Remove two duplicate keys in the alpine ``DECLARED_TO_SPDX`` mapping that + silently discarded the earlier entry of each pair. + https://github.com/aboutcode-org/scancode-toolkit/issues/5312 + v33.0.0rc1 - 2026-05-14 ------------------------ diff --git a/src/packagedcode/alpine.py b/src/packagedcode/alpine.py index 506e9d0c14b..13e9a6edd52 100644 --- a/src/packagedcode/alpine.py +++ b/src/packagedcode/alpine.py @@ -1616,7 +1616,6 @@ def apply_syntax_fixes(s): 'unrestricted': 'licenseref-scancode-other-permissive', 'open_source': 'licenseref-scancode-free-unknown', - 'as-is': 'licenseref-scancode-free-unknown', 'elementtree': 'licenseref-scancode-secret-labs-2011 and bsd-3-clause', @@ -1687,7 +1686,6 @@ def apply_syntax_fixes(s): 'custom:pil': 'licenseref-scancode-secret-labs-2011', 'custom:postcardware': 'licenseref-scancode-unknown-license-reference', 'custom:sip': 'licenseref-scancode-unknown-license-reference', - 'custom:tu-berlin-2.0': 'licenseref-scancode-unknown-license-reference', 'custom:xfree86': 'mit and x11 and hpnd-sell-variant and hpnd and mit-open-group and licenseref-scancode-other-permissive',