Skip to content

Handle Debian copyright paragraphs without a License field - #5410

Open
satiricalguru wants to merge 1 commit into
aboutcode-org:developfrom
satiricalguru:fix/issue-2977-debian-copyright-missing-license-field
Open

satiricalguru wants to merge 1 commit into
aboutcode-org:developfrom
satiricalguru:fix/issue-2977-debian-copyright-missing-license-field

Conversation

@satiricalguru

@satiricalguru satiricalguru commented Nov 3, 2026 •

Copy link
Copy Markdown

Fixes #2977

A files paragraph without License: reaches the nameless-license path, which still asks for the missing field's line numbers and raises KeyError: 'license'.

Skip that absent field and check Copyright/other fields for misplaced license notices. Keep the existing behavior for a present, unnamed License field. Add regressions for missing fields with and without an embedded notice.

Validation on Python 3.12:

  • python -m pytest -q tests/packagedcode/test_debian_copyright.py — 208 passed.
  • The new regression fails on unchanged develop with KeyError: 'license'.

CI baseline comparison

The Python 3.14 license_validate_ignorables_2 job fails the two assertions for fsl-1.1_1.RULE and fsl-1.1_2.RULE. The same assertions fail on upstream commit e423b48a1fdbff26219fbeafe7e9bdef293b91fc. Both runs report 7,494 passes and two failures in this job. All 31 other reported checks passed.

Upstream build · PR build

Tasks

  • Reviewed the contribution guidelines.
  • Descriptively titled PR linked to the original issue.
  • Upstream CI passes (pending after submission; relevant local results are listed above).
  • Uniquely named feature branch with no merge conflicts against the checked upstream base.
  • Updated CHANGELOG.rst and AUTHORS.rst.
  • Documentation: no user-facing documentation change needed for this fix.

AI assistance: Codex assisted with investigation, implementation and local tests.

Fixes aboutcode-org#2977

AI-assisted: Codex assisted with investigation, implementation and local tests.
Signed-off-by: Jatin Pandey <jatinjio1212@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure to process Debian copyright file

1 participant