From owner-freebsd-ports@FreeBSD.ORG Tue Sep 5 19:21:56 2006 Return-Path: X-Original-To: freebsd-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 8ADED16A6DF for ; Tue, 5 Sep 2006 19:21:56 +0000 (UTC) (envelope-from rcbdyndns@bellsouth.net) Received: from imf16aec.mail.bellsouth.net (imf16aec.mail.bellsouth.net [205.152.59.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id E98A943D6B for ; Tue, 5 Sep 2006 19:21:55 +0000 (GMT) (envelope-from rcbdyndns@bellsouth.net) Received: from ibm56aec.bellsouth.net ([74.226.125.153]) by imf16aec.mail.bellsouth.net with ESMTP id <20060905192154.NCMR5605.imf16aec.mail.bellsouth.net@ibm56aec.bellsouth.net> for ; Tue, 5 Sep 2006 15:21:54 -0400 Received: from [192.168.0.102] (really [74.226.125.153]) by ibm56aec.bellsouth.net with ESMTP id <20060905192153.HJLD28446.ibm56aec.bellsouth.net@[192.168.0.102]> for ; Tue, 5 Sep 2006 15:21:53 -0400 Message-ID: <44FDCE4D.3010705@bellsouth.net> Date: Tue, 05 Sep 2006 14:21:49 -0500 From: B Briggs User-Agent: Thunderbird 1.5.0.5 (X11/20060729) MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: portmaster deletes failed ports 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, 05 Sep 2006 19:21:56 -0000 Doug Barton wrote: > Hans Lambermont wrote: >> RW wrote: >> >> ... >>> I don't use portmaster myself, but I just took a look at the script and, >>> unless I'm missing something, it does appear that this feature is missing >>> from portmaster. There an option to create backup packages, but nothing to >>> automatically restore the previous version if the install fails. >> I can confirm this. The auto-restore-backup would be a nice feature. >> Doug ? ;-) > > I'm extremely reluctant to start trying to think for the user. Down that > path lies madness. > > It's easy enough to 'echo BACKUP=yes >> ~/.portmasterrc' (or > /etc/portmaster.rc) and then do the restore yourself if it's a port that you > consider mission critical. If you're going to add that to the rc file, I > suggest you also do 'mkdir -p /usr/ports/packages/All' and that way you'll > always know where your backups are. > > hth, > > Doug > Doug, I'm sorry, I love your script, but I my thoughts are that you need to rethink this. The problem is that if unattended, you will not know if the port was deleted especially if you have a lot of output. This can lead to a lot of other problems. I've looked at the script, and it seems that you could break it down into (something like) these steps: make (check return code, if it doesn't build, report error) and continue script as normal. pkg_create -b original_package_name pathto/whereveryou_wanttobackit_up) make deinstall make install clean (if it returns OK, delete the backed up package, otherwise, use pkg_add from the backup) I've probably missed some intermediate steps, but I like portmaster much better than portupgrade, and I hope you take the time to consider this. -- B Briggs