Remove duplicate keys in alpine DECLARED_TO_SPDX - #5313
Open
Daksha1611 wants to merge 1 commit into
Open
Conversation
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 <mehtadaksha1611@gmail.com>
Shriprasad-P
left a comment
There was a problem hiding this comment.
Review
PR: Remove duplicate keys in alpine DECLARED_TO_SPDX
Touched: CHANGELOG.rst, src/packagedcode/alpine.py
- Addresses a concrete correctness/reliability issue based on the title and diff.
- Security-sensitive change — please double-check edge cases and defaults.
- Size looks manageable (+4/-2).
Commenting as a drive-by reviewer after reading the diff. Happy to look again if maintainers want a deeper pass on a specific file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5312
DECLARED_TO_SPDXdefines'as-is'twice (lines 1619 and 1701) and'custom:tu-berlin-2.0'twice (lines 1690 and 1715). It is a plain dict literal, so the earlier entry of each pair was silently dropped at import and never applied.This removes the two unreachable entries and keeps the values that already win, so the mapping is identical at runtime. Whether the surviving value is the right one for each key is a separate question and left to you — for
'as-is'in particular the entry that was being discarded was the more specific one.