From owner-freebsd-stable Thu Feb 27 6:19:14 2003 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EAAD37B401 for ; Thu, 27 Feb 2003 06:19:11 -0800 (PST) Received: from ms-smtp-03.southeast.rr.com (ms-smtp-03.southeast.rr.com [24.93.67.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9A3643FBD for ; Thu, 27 Feb 2003 06:19:10 -0800 (PST) (envelope-from bts@fake.com) Received: from mail3.nc.rr.com (fe3 [24.93.67.50]) by ms-smtp-03.southeast.rr.com (8.12.5/8.12.2) with ESMTP id h1REI6iA002566; Thu, 27 Feb 2003 09:18:07 -0500 (EST) Received: from this.is.fake.com ([24.74.172.220]) by mail3.nc.rr.com with Microsoft SMTPSVC(5.5.1877.757.75); Thu, 27 Feb 2003 09:17:09 -0500 Received: by this.is.fake.com (Postfix, from userid 111) id 9D8AABA08; Thu, 27 Feb 2003 09:18:51 -0500 (EST) From: "Brian T. Schellenberger" To: Yann Golanski Subject: Re: Upgrading ports and such Date: Thu, 27 Feb 2003 09:18:51 -0500 User-Agent: KMail/1.5 References: <58951.1046312634@selfstyled.dyndns.org> <200302270829.36028.bts@babbleon.org> <20030227135451.GA31745@kierun.org> In-Reply-To: <20030227135451.GA31745@kierun.org> Cc: Gordon Broom , ajs@labs.mot.com, freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200302270918.51075.bts@babbleon.org> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Well, it's probably a case of "once bitten, twice shy" but the last time I tried portupgrade it completely destroyed my system. (Well, the /usr/local part anyway.) And since I wasn't banking on the downtime then, and hadn't done the "pkg_info -aI" beforehand it was a lot worse for me than my current approach. And I *did* try upgrading "all" the ports. (Among other things.) This script might work, though. The basic problem that portupgrade gave me, I think, was that my pkgdb wasn't quite right to start with and portupgrade can really screw things up badly. It looks like it tries to warn you about that now but either it didn't then or I didn't follow what it was trying to tell me to do. In the script below I have come questions, though: 1. I can't quite tell where the "real" linebreaks are. 2. Why do you need the whole date thing? Are you preserving the databbase so that you can restore if things go badly or something? 3. In general I'm not going to be comfortable running a script like this unless I can understand what it's doing, but I might decode it in a month or two if I feel like trying an upgrade then. (As it happens, I just did an upgrade two weeks ago using my "scorched earth" approach so I don't feel any need to upgrade right now.) I'm not so sure that I'm looking to change my approach anyway; the complete wipe / install approach gives a very clean and consistent system with just one version of each library and all that and I always take the chance to clean up and get rid of ports that I'm not really using. That sort of cleanup won't ever happen with portupgrade. Though if the entire process could be fully automated with minimal downtime, that might make up for it. On Thursday 27 February 2003 08:54 am, you wrote: | Quoth Brian T. Schellenberger on Thu, Feb 27, 2003 at 08:29:36 -0500 | | > FWIW, I have found only one way to update my ports / packages and | > get things to work reasonably realiably: I completely wipe out my | > old system and replace it when I choose to upgrade at all. | | That is a lot of over kill. I use the following little script: | | #!/bin/sh | # portupgrade script. | day=`date +%d` | month=`date +%b` | year=`date +%Y` | /usr/local/bin/cvsup -g -L 2 /usr/ports/GRIDLOCK.cvsup | /usr/local/sbin/pkgdb -F | /usr/bin/tar zvcf /var/db/$year-$month-$day-pkg.tgz | /var/db/pkg /usr/local/sbin/portupgrade -v -x mailman -ra -l | /usr/ports/LATEST.update | /usr/bin/grep -v '^\-' /usr/ports/LATEST.update | | Where /usr/ports/GRIDLOCK.cvsup is: | | *default tag=. | *default host=cvsup.uk.FreeBSD.org | *default prefix=/usr | *default base=/usr/local/etc/cvsup | *default release=cvs delete use-rel-suffix compress | ports-all | | And it upgrades everything for me. No trouble at all. | | > I realize that "portupgrade" does wonderful things for a number of | > people and it may work well for those of you who update your whole | > systems weekly or so, but I have had very little luck with it | > myself. | | Try the above scripts. -- Brian, the man from Babble-On . . . . bts@babbleon.org (personal) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message