How to detect portupgrade and barf
Brooks Davis
brooks at one-eyed-alien.net
Mon Oct 10 14:48:14 PDT 2005
On Mon, Oct 10, 2005 at 04:50:05PM +0100, Nick Hilliard wrote:
> Is there a recommended method for detecting if a port is being upgraded
> using portupgrade? I'm working on a port of a system at the moment
> which requires both the old version and the new version to be installed
> simultaneously. If portupgrade gets its hands on this, the internal
> upgrade process will die because the old version will no longer be
> present, and this will cause the upgrade process to die horribly. What
> I'd like to do is to detect if portupgrade is being used and if so, die
> with an appropriate error message.
>
> There are several extra shell variables available on portupgrade,
> including ${PORTSDIR}, ${PACKAGES} and ${PKG_PATH}, but they don't look
> portupgrade-specific enough to use for this purpose.
>
> Any suggestions?
Do what needs to be done in the deinstall script of the package. If you
can't do that for some reason, you must find a way to have them both
installed at once that is supported by the ports collection. Short
of some sort of new port per version scheme I don't see a way to do
that.
-- Brooks
--
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20051010/8a884b59/attachment.bin
More information about the freebsd-ports
mailing list