From owner-freebsd-questions@FreeBSD.ORG Thu Mar 24 03:01:04 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B28B16A4CE; Thu, 24 Mar 2005 03:01:04 +0000 (GMT) Received: from lakermmtao05.cox.net (lakermmtao05.cox.net [68.230.240.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5F2043D41; Thu, 24 Mar 2005 03:01:03 +0000 (GMT) (envelope-from bob89@bobj.org) Received: from mail.bobj.org ([68.101.66.44]) by lakermmtao05.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050324030103.QAMT3789.lakermmtao05.cox.net@mail.bobj.org>; Wed, 23 Mar 2005 22:01:03 -0500 Received: from bobj.dyndns.org ([192.168.132.161]) (AUTH: PLAIN bobj, ) by mail.bobj.org with esmtp; Wed, 23 Mar 2005 22:01:02 -0500 From: Bob Johnson To: freebsd-questions@freebsd.org User-Agent: KMail/1.7.2 References: <20050324011607.GA1199@ayvali.org> In-Reply-To: <20050324011607.GA1199@ayvali.org> MIME-Version: 1.0 Content-Disposition: inline Date: Wed, 23 Mar 2005 22:00:58 -0500 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200503232200.58849.bob89@bobj.org> cc: questions@freebsd.org cc: "N.J. Thomas" Subject: Re: greetings from FreeBSD DLL Hell! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2005 03:01:04 -0000 On Wednesday 23 March 2005 08:16 pm, N.J. Thomas wrote: > I installed FreeBSD 5.3-RELEASE and was installing packages via "pkg_add > -r foo". This worked, but it went and downloaded older versions of > various programs (i.e. Mozilla Firefox 0.9). How can I tell pkg_add to > use the "5-latest" (5-STABLE? RELENG_5_3?) branch? Do I have to update > my sources before I can do this? By default, pkg_add uses the packages that were built for your release (so everything is consistent). As a result, when your release gets to be a few months old, so do the packages. One approach to solving your problem is to go to ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/All/ and download the package you want, then install it with pkg_add. Another is to set the appropriate environment variable to tell pkg_add to use that URL as the location from which to automatically fetch packages (I don't remember the variable, try to decipher the man page). That said, the solution I usually use is to upgrade everything from ports rather than packages. One way to accomplish this is to install the portupgrade port, then use it to upgrade a port/package and everything it depends on: First, install portupgrade. Then cvsup your ports collection so it is as recent as possible, then fetch the updated index so you don't have to wait for your system to build one: # cvsup ports-supfile # cd /usr/ports # make fetchindex then upgrade the ports that need upgrading: # portupgrade -R portname This will upgrade (from source) the port (or package) named portname, as well as all ports that it requires. There can be some glitches with this method on some ports, so read the man page and look at the examples it gives. Sometimes a dependency won't update automagically and you will need to portupgrade it separately, then go back and issue the top-level command again and let it pick up where it left off. This method can take a very very long time if something big gets rebuilt from source. You can also tell portupgrade to install packages rather than ports. I believe portupgrade uses the PKG_FETCH environment variable to tell it where to fetch packages from, so set it to the ftp URL above and you should get the latest packages, e.g. in bash, something like # export PKG_FETCH ftp://(etc) ; portupgrade -RPP portname You can even upgrade every package/port installed on your system with something like # export PGK_FETCH ftp://(...) ; portupgrade -RrP * The portmanager fans out there will tell you it is easier to use portmanager than portupgrade, but I've never used it, so you'll have to wait for their suggestions. > > So after I installed 5.3 yesterday I installed some packages with > pkg_add -r (which used the 5.3-RELEASE versions of the software), and > then installed some other stuff with ports, and then updated ports with > cvsup and then installed yet some more stuff, and now I seem to find > myself in the FreeBSD equivalent of "DLL Hell". Should I just blow my > system away and start from scratch? Is that the best course of action to > take at this point? > What do you mean when you say you are in DLL hell? Is something actually not working right? FreeBSD is pretty good about managing libraries. It should not be a problem to have multiple versions of the same library; different programs will use the version they were built for. This may not be true for Linux ports, though (not sure). Anyway, any (or a combination of) the methods I described above should be able to get everything straightened out after you fix the parts I likely remembered wrong. > thanks, > Thomas Good luck. - Bob