From owner-freebsd-ports@FreeBSD.ORG Mon Oct 10 21:48:13 2005 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7D0B16A41F for ; Mon, 10 Oct 2005 21:48:13 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97FE843D45 for ; Mon, 10 Oct 2005 21:48:13 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j9ALmDha027468; Mon, 10 Oct 2005 14:48:13 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j9ALmDMm027467; Mon, 10 Oct 2005 14:48:13 -0700 Date: Mon, 10 Oct 2005 14:48:13 -0700 From: Brooks Davis To: Nick Hilliard Message-ID: <20051010214813.GD24213@odin.ac.hmc.edu> References: <1128959405.30953.4.camel@localhost.netability.ie> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C1iGAkRnbeBonpVg" Content-Disposition: inline In-Reply-To: <1128959405.30953.4.camel@localhost.netability.ie> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: ports@freebsd.org Subject: Re: How to detect portupgrade and barf X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2005 21:48:14 -0000 --C1iGAkRnbeBonpVg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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 --=20 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 --C1iGAkRnbeBonpVg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDSuGcXY6L6fI4GtQRAr1yAKDaGfrQhfKd/MEZBEq8UGWLzqyF4wCdHqgk UKAHDpdYarZrTfTGZEs9qCk= =f4o6 -----END PGP SIGNATURE----- --C1iGAkRnbeBonpVg--