From owner-freebsd-ports@FreeBSD.ORG Tue Oct 11 16:21:39 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 8C5E116A41F for ; Tue, 11 Oct 2005 16:21:39 +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 31DB043D45 for ; Tue, 11 Oct 2005 16:21:37 +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 j9BGLbTh005551; Tue, 11 Oct 2005 09:21:37 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j9BGLb9r005550; Tue, 11 Oct 2005 09:21:37 -0700 Date: Tue, 11 Oct 2005 09:21:37 -0700 From: Brooks Davis To: Nick Hilliard Message-ID: <20051011162137.GB2264@odin.ac.hmc.edu> References: <1128959405.30953.4.camel@localhost.netability.ie> <20051010214813.GD24213@odin.ac.hmc.edu> <1129020397.11029.10.camel@localhost.netability.ie> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QKdGvSO+nmPlgiQ/" Content-Disposition: inline In-Reply-To: <1129020397.11029.10.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: Brooks Davis , 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: Tue, 11 Oct 2005 16:21:39 -0000 --QKdGvSO+nmPlgiQ/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 11, 2005 at 09:46:37AM +0100, Nick Hilliard wrote: > > 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. >=20 > Hi Brooks, >=20 > Both old and new package will be installed in version specific > directories, so no overlap will occur and the versions can be used and > run simultaneously. >=20 > The problem is how to detect whether portupgrade is being used to run > the pkg_delete, or whether pkg_delete is being run directly from the > command line. Is this supported, or is there some good or recommended > way of doing this? There is no easy way to do this and doing it won't really solve the problem because it won't prevent people from doing the same thing manually. The problem is that this port violates certain assumptions of the ports infrastructure. Hmm, one slightly evil thought occurs to me. Since the software installs in different directories each time, what about copying the previous install into WRKDIR and reinstalling it as part of the installation process? Your plist would be odd, but it might work. Another option that would be more work but might be cleaner since it could let you uninstall the old bits after upgrade would be a special port that takes care of saving a copy of the old for you which is a BUILD_DEPEND and INSTALL_DEPEND if and only if a previous install exists. It wouldn't prevent some types of foot shooting, but it would insure that the following works: make make deinstall make install -- 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 --QKdGvSO+nmPlgiQ/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDS+aQXY6L6fI4GtQRAmmjAKCIYYYOVzs5uBeZEWYAIcCp8H/SGQCgk6BY bVTsv0Jbw6ZKeDqfjZkVFP8= =h4LM -----END PGP SIGNATURE----- --QKdGvSO+nmPlgiQ/--