How to detect portupgrade and barf

Nick Hilliard nick-lists at netability.ie
Mon Oct 10 07:50:34 PDT 2005


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?

Nick




More information about the freebsd-ports mailing list