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
Current Resolve in pkg/fetch/fetch.go:
- Initialize all packages with
Exists: true - Check local DB, set
Installed: trueif found - Check sync DBs, set
Installed: false - Check AUR, set
InAUR: true - Error if not found anywhere
Bug: wrong default + wrong order + conflates two concerns.
Goals / Non-Goals
Goals:
- Fix Resolve algorithm to correctly classify packages
- Separate "available" from "installed" concerns
Non-Goals:
- No new APIs or features
- No refactoring outside Resolve function
Decisions
Decision 1: Start with Exists: false
- Default
Exists: false(unknown) instead oftrue - Only set true when confirmed in sync DBs
Decision 2: Check sync DBs first
- Order: sync → local → AUR
- First determine if package exists (anywhere)
- Then determine if installed (local only)
Decision 3: Two-phase classification
| Phase | Check | Sets |
|---|---|---|
| 1. Availability | sync DBs | Exists: true/false |
| 2. Installation | local DB | Installed: true/false |
| 3. Fallback | AUR | InAUR: true if not in sync |
Risks / Trade-offs
- Minimal risk: localized fix only
- Trade-off: slight performance cost (check sync before local) - acceptable for correctness