fix: support multi-arch packages in dpkg scanner#2500
Open
zozo123 wants to merge 1 commit intofuture-architect:masterfrom
Open
fix: support multi-arch packages in dpkg scanner#2500zozo123 wants to merge 1 commit intofuture-architect:masterfrom
zozo123 wants to merge 1 commit intofuture-architect:masterfrom
Conversation
dpkg Multi-Arch allows packages with the same name for different architectures (e.g. libc6:amd64 and libc6:i386). Previously the Packages map was keyed only by package name, causing multi-arch packages to overwrite each other. Changes: - Parse architecture from dpkg-query binary:Package field - Store architecture in Package.Arch field - Use "name:arch" as map key when architecture is present - Add Package.MapKey() helper for consistent key generation - Update all Packages map lookups to use the new key format Fixes future-architect#2423 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
islo.dev Review: #2500
Grade: A- | Verdict: APPROVE SummaryAdds multi-architecture support for dpkg packages by introducing a Key Findings
islo.dev PR Code Reviewer |
zozo123
commented
Apr 5, 2026
Author
zozo123
left a comment
There was a problem hiding this comment.
islo.dev — Score: 4.3/5 — APPROVE
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.
Summary
libc6:amd64andlibc6:i386), but previously one would overwrite the other in the Packages mapPackage.MapKey()helper that returnsname:archwhen architecture is present, or justnameotherwisebinary:Packagefield indpkg-queryoutputdebian.go,packages.go, andvuls2.goto use the new key formatFiles Changed
models/packages.go: AddedMapKey()method, updatedNewPackagesandMergeNewVersionto use map keysscanner/debian.go: Parse arch from dpkg output, usename:archmap keys, updatedfillCandidateVersion, changelog functions, andparseCheckRestartdetector/vuls2/vuls2.go: UpdatedpreConvertto iterate with map keys instead ofp.NameFixes #2423
Built autonomously by islo.dev Builder