Skip to content

Use purl's ComparisonForm for package identity - #589

Merged
andrew merged 2 commits into
git-pkgs:mainfrom
simonchrz:refactor/purl-normalise
Oct 25, 2026
Merged

andrew merged 2 commits into
git-pkgs:mainfrom
simonchrz:refactor/purl-normalise

Conversation

@simonchrz

Copy link
Copy Markdown
Contributor

Closes #563.

The per-ecosystem rules for when two spellings name the same package now come from purl's ComparisonForm (git-pkgs/purl#50) instead of the denylist's own switch: PEP 503 for PyPI, NuGet case, Composer's leading v, the conda channel, OCI paths and Swift registry case.

What stays in the proxy:

  • The pkg:generic/swift-registry/{scope}.{name} spelling, which is the proxy's own. The denylist maps it to pkg:swift/{scope}/{name} before comparing.
  • An entry without a conda channel still matches every channel.
  • The gem platform match.

The NuGet retention key uses the comparison form too. Denylist keys, cache paths and stored PURLs are unchanged; the existing denylist and retention tests pass as they are.

go.mod points at a pseudo-version of purl main until #50 is in a release. I'll switch it to the tag then.

simonchrz and others added 2 commits October 24, 2026 18:58
The per-ecosystem rules for when two spellings name the same package
(PEP 503, NuGet case, Composer's leading v, conda channel, OCI paths,
Swift registry case) now live in purl. The denylist keeps only the
proxy's own pkg:generic/swift-registry spelling and the gem platform
match. Keys, cache paths and stored PURLs are unchanged.
@andrew
andrew merged commit fcce59c into git-pkgs:main Oct 25, 2026
7 checks passed
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.

Move per-ecosystem name normalisation into git-pkgs/purl

2 participants