- Add snack.Locker embed for per-provider mutex serialization
- Update all providers (pacman, apk, apt, dpkg) to use []Target
with version pinning support (pkg=version syntax)
- Add lock/unlock to all mutating operations (Install, Remove, Purge,
Upgrade, Update)
- Add snack.TargetNames helper and formatTargets per provider
- apt: add FromRepo (-t) and Reinstall support
- dpkg: use Target.Source for .deb file paths in Install
Breaking change to Manager interface: Install/Remove/Purge now accept
[]Target instead of []string. Target supports Version pinning, FromRepo
constraints, and Source paths — matching SaltStack's pkgs list semantics.
Also adds WithRefresh, WithFromRepo, WithReinstall options.
Implement the snack.Manager interface for both apt (Debian/Ubuntu) and
dpkg (low-level Debian package tool).
apt wraps apt-get, apt-cache, and dpkg-query for full package management.
dpkg wraps dpkg and dpkg-query for low-level .deb operations.
Upgrade and Update return ErrUnsupportedPlatform for dpkg.
Both packages include:
- Linux implementations with proper error wrapping
- Non-linux build stubs returning ErrUnsupportedPlatform
- Output parsing helpers with tests
- Functional options support (sudo, assume-yes, dry-run)
Implements the snack.Manager interface for Alpine Linux's apk-tools:
- Install, Remove, Purge, Upgrade, Update operations
- List installed, Search, Info, IsInstalled, Version queries
- Output parsing for apk list, search, and info formats
- Linux-only implementation with build-tag stubs for other platforms
- Options support: WithSudo, WithDryRun, WithRoot
- Tests for all output parsing functions