Conversation
Official repos and AUR via PURL type alpm with namespace routing. Covers package metadata, versions, deps, maintainers, and URLs.
📝 WalkthroughWalkthroughAdds Arch Linux (ALPM) support: ecosystem-specific PURL name normalization for Changes
Sequence Diagram(s)sequenceDiagram
actor Client
participant AlpmRegistry
participant ArchAPI as "Arch Official API"
participant AURAPI as "AUR API"
Client->>AlpmRegistry: fetchPackage("arch/pacman" or "aur/yay")
activate AlpmRegistry
AlpmRegistry->>AlpmRegistry: parseName(), assertSupportedNamespace(), normalize PURL (alpm lowercasing)
alt namespace == "arch"
AlpmRegistry->>ArchAPI: searchOfficial / fetchPackage
activate ArchAPI
ArchAPI-->>AlpmRegistry: ArchSearchResponse / package data
deactivate ArchAPI
AlpmRegistry->>AlpmRegistry: format versions (epoch), parse deps, merge licenses
AlpmRegistry-->>Client: Package object
else namespace == "aur"
AlpmRegistry->>AURAPI: fetchAurInfo / fetchAurPackage
activate AURAPI
AURAPI-->>AlpmRegistry: AurResponse / package data
deactivate AURAPI
AlpmRegistry->>AlpmRegistry: parse deps, normalize metadata
AlpmRegistry-->>Client: Package object
end
deactivate AlpmRegistry
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
No issues found across 5 files
Architecture diagram
sequenceDiagram
participant App as Application Code
participant Core as Core Registry Factory
participant ALPM as NEW: AlpmRegistry
participant HTTP as Client (Fetch)
participant ArchAPI as Arch Linux API
participant AurAPI as AUR RPC API
Note over App, AurAPI: ALPM Package Request Flow (Official vs AUR)
App->>Core: create('alpm')
Core-->>App: alpm registry instance
App->>ALPM: fetchPackage(name)
ALPM->>ALPM: CHANGED: parseName(name)<br/>(Extract namespace 'arch' or 'aur')
alt namespace == 'arch'
ALPM->>HTTP: getJSON("/packages/search/json/?name=...")
HTTP->>ArchAPI: GET /packages/search/json/
ArchAPI-->>HTTP: JSON (results[])
HTTP-->>ALPM: ArchSearchResponse
ALPM->>ALPM: Filter for 'x86_64' architecture
else namespace == 'aur'
ALPM->>HTTP: getJSON("/rpc/v5/info/...")
HTTP->>AurAPI: GET /rpc/v5/info/
AurAPI-->>HTTP: JSON (results[])
HTTP-->>ALPM: AurResponse
end
ALPM->>ALPM: Normalize to Package type<br/>(licenses, deps, metadata)
ALPM-->>App: Package Object
Note over App, ALPM: Dependency Resolution Flow
App->>ALPM: fetchDependencies(name, version)
ALPM->>ALPM: Fetch raw package data (Arch or AUR)
ALPM->>ALPM: NEW: buildDependencies()<br/>(Maps depends, makedepends, optdepends, checkdepends)
ALPM-->>App: Dependency[]
Note over App, AurAPI: URL Generation
App->>ALPM: urls().purl(name, version)
ALPM-->>App: "pkg:alpm/{namespace}/{name}@{version}"
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Around line 85-86: The README sentence about Arch Linux packages is ambiguous
about whether the `arch` namespace is required; update the wording around "Arch
Linux packages use a namespace prefix: `pkg:alpm/arch/pacman` for official
repos, `pkg:alpm/aur/paru` for AUR." and the following sentence so it clearly
states that official Arch packages may omit the `arch` namespace (it defaults to
`arch` when omitted) while AUR packages must include the explicit `aur`
namespace; rephrase both sentences to convey that distinction unambiguously.
Adds the alpm registry for Arch Linux packages. Namespace picks between official repos (
arch/) and AUR (aur/).Closes #9