Subject: Upgrading vs. dependencies vs. ...
To: None <tech-pkg@NetBSD.ORG>
From: Todd Vierling <firstname.lastname@example.org>
Date: 07/20/1998 12:13:40
Here's a brainstorm towards improving our handling of pkg upgrades. It
would probably require additions to both pkgsrc and the pkg_* tools.
- Upgrading a pkg with the same version number (usually a bugfix or build
fix): pkg will be deleted and replaced with the new pkg, preserving the
- Upgrading a pkg to a new version number:
* If no '.*/lib\*\.so\.[0-9]+\.[0-9]+$' library files exist in +CONTENTS:
= Install as with the same version number above.
= Update dependent pkgs' @pkgdep lines to the new version.
* If shared libraries exist:
= Delete all files except these libraries, and ignore @dirrm errors.
= Strip the +CONTENTS down to only the shared objects (and if on ELF,
also the major-version-only symlink).
= Keep the old pkg version installed, replacing the +CONTENTS file
with one containing only the shared objects
= Install the new version as well, and copy the +REQUIRED_BY file from
the old version to the new version (both will contain the same
= Update dependent pkgs' @pkgdep lines to have dependencies on _both_
the old and new pkg versions.
= Note: could also care for updating where some or all libraries have
the same major version number - there's a bit of trickiness there.
- If a new pkg version has changes (moved files, dropped binaries) that
could be used directly by a dependent pkg, add a CONFLICTS entry. This
can be hard to see in some programs and easier in others. Example: moving
the Tcl "script library" directory.
The schema for this took the following factors into account:
- pkgs can depend on other pkgs for shared libraries
(and should not break if a dependent pkg updates)
- pkgs can depend on other pkgs for user programs run via system()/exec()
(such as scripts needing gm4, gmake, ....)
- pkgs can depend on other pkgs for data and config files
(such as Tcl and Perl library scripts)
-- Todd Vierling (Personal email@example.com; Bus. firstname.lastname@example.org)