Subject: Apropos package upgrading.
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
From: Johan Ihren <johani@autonomica.se>
List: current-users
Date: 03/18/2001 22:02:04
Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de> writes:
> FYI, I just committed this code to NetBSD-current's pkg_add:
>
> Add -u switch to pkg_add to do a very rudimentare form of pkg upgrading:
> When invoked with 'pkg_add -u ...', and the package to be installed is
> found already being installed, the old (installed) package is removed
> with pkg_delete, and the new one is installed.
>
> A very crude handling of dependencies is done (by moving the +REQUIRED_BY
> file aside before pkg_delete, and back into place after the new pkg is
> installed).
>
> I'd appreciate testing and any feedback!
One quick comment about pkg upgrading when building from source:
Sometimes it happens that packages dont't build entirely without
pain. For that reason I typically build first and install (as in
upgrade) after the build went ok.
Therefore I suggest that the removal of the previous version is
deferred until after the build went well. This way you don't run the
risk of ending up with the old version removed and the new version in
pieces.
Johan