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
Dry-Run Mode
Summary
Add --dry-run flag to simulate the sync operation without making any changes
to the system. Shows what packages would be installed and what would be removed.
Motivation
Users want to preview the effects of a sync operation before committing changes. This is useful for:
- Verifying the intended changes are correct
- Avoiding unintended package installations
- Understanding what orphan cleanup will remove
Interface
declpac --dry-run --state packages.txt
Behavior
- Read state files and stdin (same as normal mode)
- Validate packages exist (same as normal mode)
- Query current installed packages via
pacman -Qq - Compare declared packages to current state
- Identify packages that would be installed (not currently installed)
- Identify orphans that would be removed via
pacman -Qdtq - Output results with "Would install:" and "Would remove:" sections
Output Format
Installed 3 packages, removed 2 packages
Would install: vim, git, docker
Would remove: python2, perl-xml-parser
Non-Goals
- Actual package operations (no pacman -Syu, no pacman -Rns execution)
- Package version comparison
- Detailed dependency analysis
Trade-offs
- Doesn't predict transitive dependencies that pacman might install
- Orphan list may change after packages are installed