Updating Packages
Dieter Baron < dillo@NetBSD.org >
Thomas Klausner < wiz@NetBSD.org >
Current State: make update
- unstable: stops if building a package fails
- inefficient: re-installs same package multiple times
- only one package (and its dependents) at a time
Current State: make replace
- unsafe: can delete needed shared library
- only one package at a time
- should use PROVIDES/REQUIRES to check that update is safe
Current State: pkg_chk -u(b)
- unstable: stops if building a package fails
- deletes all outdated packages before downloading/building new ones
(can leave many missing packages)
Safe Update: Steps to Take
- find all outdated packages
- get binary packages
- optionally build missing packages in sandbox
- check that set of packages is consistent
- optionally make binary packages of packages to be deleted
- update all non-automatic and all used automatic packages
- remove all unused automatic packages
Rollback Options
- undo update completely
- undo update of a leaf package
- undo update of a library and its users
- undo update of a library without its users (if no major version bump)
- undo update of a leaf package and all its updated dependencies
Open Questions: Error Recovery
- no package found (and building failed)
- use old version?
- skip updating this part of the dependency tree?
- leave packages missing?
- let user choose from above?