You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.2 KiB
1.2 KiB
Context
The dyalpm library's SyncDBs() returns an empty slice because it doesn't automatically load sync databases from pacman.conf. This causes resolvePackages() to skip the sync DB search entirely and fall through to checking the AUR, which fails for official repo packages.
Goals / Non-Goals
Goals:
- Register sync databases so
resolvePackages()can find official repo packages
Non-Goals:
- Modify package installation logic
- Add support for custom repositories
Decisions
-
Register each repo manually - After
handle.SyncDBs()returns empty, loop through known repos (core, extra, multilib) and callhandle.RegisterSyncDB()for each. -
Use hardcoded repo list - Arch Linux standard repos are core, extra, multilib. This matches pacman.conf.
-
Silent failure for missing repos - If a repo isn't configured in pacman.conf,
RegisterSyncDBwill return a valid but empty DB. Filter by checking ifPkgCache()has any packages.
Risks / Trade-offs
- Hardcoded repo names may need updating if Arch adds/removes standard repos → Low risk, rare change
- Repo registration could fail silently → Mitigated by checking PkgCache count