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.3 KiB
1.3 KiB
1. Dependencies
- 1.1 Add github.com/Jguer/dyalpm to go.mod
- 1.2 Run go mod tidy to resolve dependencies
2. Pac Struct Updates
- 2.1 Add dyalpm handle field to Pac struct
- 2.2 Add package info cache field (map[string]PackageInfo) to Pac struct
- 2.3 Update New() to initialize dyalpm handle
- 2.4 Update Close() to release dyalpm handle
3. ValidatePackage Implementation
- 3.1 Implement ValidatePackage using dyalpm LocalDB().Pkg()
- 3.2 Query sync databases if not found locally
- 3.3 Add caching logic to store/query results
- 3.4 Keep AUR fallback for packages not in pacman repos
4. MarkExplicit Updates
- 4.1 Change MarkExplicit signature to accept []string (slice of packages)
- 4.2 Implement single pacman -D --explicit call with all packages
- 4.3 Handle empty slice case (return nil immediately)
5. Call Site Updates
- 5.1 Update Sync() to pass packages slice to MarkExplicit
- 5.2 Ensure categorizePackages works with new ValidatePackage
6. Testing
- 6.1 Run existing tests to verify no regressions
- 6.2 Test ValidatePackage with local, sync, and AUR packages
- 6.3 Test MarkExplicit with single and multiple packages
- 6.4 Verify cache behavior (second call returns cached result)