From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 7 06:17:12 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 947B816A401 for ; Wed, 7 Feb 2007 06:17:12 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.freebsd.org (Postfix) with SMTP id 3767313C442 for ; Wed, 7 Feb 2007 06:17:11 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 60949 invoked by uid 1001); 7 Feb 2007 06:18:03 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Wed, 07 Feb 2007 01:18:02 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17865.28442.623829.375834@bhuda.mired.org> Date: Wed, 7 Feb 2007 01:18:02 -0500 To: Joan Picanyol i Puig In-Reply-To: <20070207020205.GC62321@grummit.biaix.org> References: <8b4c81f0702061514r5a753e48yea0ce9b937236fc3@mail.gmail.com> <17865.6041.605201.772296@bhuda.mired.org> <20070207020205.GC62321@grummit.biaix.org> X-Mailer: VM 7.17 under 21.4 (patch 20) "Double Solitaire" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: pkg_upgrade (was Re: pkg_add does not backtrack, does it?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2007 06:17:13 -0000 In <20070207020205.GC62321@grummit.biaix.org>, Joan Picanyol i Puig typed: > * Mike Meyer [20070207 01:05]: > > If you let us know what your goals are, we might be able to help you > > get there. > > I know what I'd like: a utility in the base system for binary upgrading > of packages. More flexible logic in how the '-r' option is handled would > be nice (being able to fetch all packages from All/ even if you are > on RELENG). Doesn't > > freebsd-update fetch install && pkg_upgrade -a > > look nice for keeping up to date? Not particularly, but why does it have to be in the base system? freebsd-update isn't. But if you insure the ports database is pristine and want to blindly update all your installed packages at once, you can do something like: freebsd-udpate fetch install && (portversion -c -C P | /bin/sh) I haven't tested it; in particular I'm not sure I got the syntax for -C right, and there are probably other things that are broken as well. > The obvious hairy details must be > harder than it seems, I'm sure others have considered it (and would have > done it) before. The thing is, chances are pretty good that at some point or another, you're *not* going to want to just update all the installed packages. Some package may require external work, or you may want to follow a different branch than the main port, or an update may include a new bug that you can't live with, or you may have something installed that's not in the ports tree that breaks if you update a port, etc. And of course, this doesn't work well if you've managed to corrupt the ports database, which is all to easy to do. Or at least I've found that to be the case. Maybe if I could only convince myself to *always* use portinstall, and not just do a "make install" after I've read through the package description, things wouldn't be so bad, but they are. People have tried this. portupgrade is the most complete solution I know of, though there are others in the ports tree. It can do binary-only upgrades, or can be set to try the binaries first, and only build if the binaries aren't available. It also has flags to save the old install, and a config file that lets you hold packages, or set build options if you build. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.