APT multi-arch package parsing creates empty package names
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- go, linux
- Domain
- cli, operating-systems
Research direction
Read manager/apt/utils.go to trace ParseFindOutput and ParseDpkgQueryOutput, then inspect the related cases in manager/apt/utils_test.go. Run the APT parser tests first and add coverage for packages installed under multiple architectures. Done means both architecture-specific packages retain distinct names and no empty package entry is produced.
Written by the indexing model from the issue text.
Description
Summary
APT search results occasionally show entries with empty package names (e.g., : [version][] (installed)) when multi-architecture packages are installed.
Root Cause Analysis
The issue occurs when dpkg returns multiple architectures for the same package (e.g., libcurl4:amd64 and libcurl4:i386), but our search parsing only finds one entry.
Technical Details
- APT search finds:
libcurl4/jammy-updates,jammy-security,now 7.81.0-1ubuntu1.20 amd64 [installed] - Parsed as:
{Name: "libcurl4", Arch: "amd64"} - dpkg-query returns TWO packages:
libcurl4:amd64ANDlibcurl4:i386 - First processing: Finds
libcurl4in map, processes correctly, deletes from map - Second processing: Can't find
libcurl4in map (already deleted), creates empty PackageInfo
Current Impact
- Frequency: <0.1% of packages affected
- Severity: Cosmetic only - no functional impact
- Example Output:
: [7.81.0-1ubuntu1.20][] (installed)
Proposed Solution
Implement proper multi-arch support by using name:arch as the key throughout the parsing pipeline:
Changes Required
- ParseFindOutput: Use
name:archas dictionary key instead of justname - ParseDpkgQueryOutput: Parse architecture from dpkg output and use matching key
- Display: Show multi-arch packages as
package:arch(e.g.,libcurl4:amd64)
Benefits
- ✅ Eliminates cosmetic parsing bug
- ✅ Provides accurate multi-arch representation
- ✅ Matches APT's actual behavior
- ✅ Useful for debugging multi-arch dependency issues
Implementation Notes
- Scope: APT-specific (other package managers already handle this correctly)
- Breaking Changes: None - just improved accuracy
- Files:
manager/apt/utils.go,manager/apt/utils_test.go - Complexity: Low - ~20 lines of changes
Test Cases
# Before fix
apt: libcurl4 [version][version] (installed)
: [version][] (installed) # ← Bug
# After fix
apt: libcurl4:amd64 [version][version] (installed)
apt: libcurl4:i386 [version][version] (installed)
Priority
Low - This is a cosmetic issue that doesn't affect core functionality. The system works correctly for 99.9%+ of packages.
Labels
enhancementaptparsingmulti-arch
- Dominant language
- Go
- Stars
- 17
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bluet/syspkg
-
Dependency Dashboard Open
Difficulty 4/5 3-5 days Newbie friendliness 15/100
-
testing
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100