From owner-freebsd-ports@FreeBSD.ORG Tue Oct 11 18:38: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 37D0816A41F for ; Tue, 11 Oct 2005 18:38:13 +0000 (GMT) (envelope-from itetcu@people.tecnik93.com) Received: from relay.rdsnet.ro (gimli.rdsnet.ro [193.231.236.70]) by mx1.FreeBSD.org (Postfix) with SMTP id E1C6643D48 for ; Tue, 11 Oct 2005 18:38:11 +0000 (GMT) (envelope-from itetcu@people.tecnik93.com) Received: (qmail 2827 invoked from network); 11 Oct 2005 18:38:07 -0000 Received: from unknown (HELO smtp.rdsnet.ro) (62.231.74.130) by smtp1-133.rdsnet.ro with SMTP; 11 Oct 2005 18:38:07 -0000 Received: (qmail 16162 invoked by uid 89); 11 Oct 2005 18:38:08 -0000 Received: from unknown (HELO it.buh.tecnik93.com) (81.196.204.98) by 0 with SMTP; 11 Oct 2005 18:38:08 -0000 Received: from it.buh.tecnik93.com (localhost.buh.tecnik93.com [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id B2C30115FE; Tue, 11 Oct 2005 21:38:06 +0300 (EEST) Date: Tue, 11 Oct 2005 21:38:06 +0300 From: Ion-Mihai Tetcu To: Brooks Davis Message-ID: <20051011213806.1a2e3c9d@it.buh.tecnik93.com> In-Reply-To: <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> <20051011162137.GB2264@odin.ac.hmc.edu> X-Mailer: Sylpheed-Claws 1.9.12 (GTK+ 2.6.8; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Brooks Davis , ports@freebsd.org, Nick Hilliard 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 18:38:13 -0000 On Tue, 11 Oct 2005 09:21:37 -0700 Brooks Davis wrote: > 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. > > > > Hi Brooks, > > > > 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. > > > > 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 This reminds me (not directly related) that maybe is time to find some way to: make reinstall <> make deinstall && make install > 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, Please yell as much as possible in pre-everything (and say: no, this ain't a temporary thing, it won't change when next port version is released). -- IOnut Unregistered ;) FreeBSD "user" "Intellectual Property" is nowhere near as valuable as "Intellect"