From owner-freebsd-questions@FreeBSD.ORG Thu Apr 22 07:25:08 2004 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 9A10F16A4CE for ; Thu, 22 Apr 2004 07:25:08 -0700 (PDT) Received: from mynah.mail.pas.earthlink.net (mynah.mail.pas.earthlink.net [207.217.120.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8451A43D45 for ; Thu, 22 Apr 2004 07:25:08 -0700 (PDT) (envelope-from algould@datawok.com) Received: from 20-74.lctv-b4.cablelynx.com ([24.204.20.74] helo=[192.168.63.10]) by mynah.mail.pas.earthlink.net with asmtp (TLSv1:RC4-MD5:128) (Exim 3.36 #4) id 1BGf8T-0001DA-00; Thu, 22 Apr 2004 07:25:06 -0700 From: "Andrew L. Gould" To: Richard Bradley Date: Thu, 22 Apr 2004 09:25:09 -0500 User-Agent: KMail/1.6.1 References: <200404221341.17612.rtb27@cam.ac.uk> <200404220829.28558.algould@datawok.com> <200404221457.53576.rtb27@cam.ac.uk> In-Reply-To: <200404221457.53576.rtb27@cam.ac.uk> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404220925.09931.algould@datawok.com> X-ELNK-Trace: ee791d459e3d6817d780f4a490ca69564776905774d2ac4bf8b97cb563851f288578035308708bf7350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c cc: freebsd-questions@freebsd.org Subject: Re: Keeping Ports synchronised with Packages 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, 22 Apr 2004 14:25:08 -0000 On Thursday 22 April 2004 08:57 am, Richard Bradley wrote: > On Thursday 22 April 2004 2:29 pm, Andrew L. Gould wrote: > > On Thursday 22 April 2004 07:41 am, Richard Bradley wrote: > > [...] > > > > My problem is that my ports tree is always a couple of minor versions > > > ahead of the available packages. > > [...] > > > > This means I have a load of libraries that are different versions to > > > those the precompiled packages expect, and some packages even refuse to > > > install. > > > > The way to update your system source and hold back package/port versions > > is to refuse ports. See: > > > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html > > > > Alternatively, you can continue to cvsup ports and then upgrade your > > packages to newer versions using the port portupgrade, which can be found > > at /usr/ports/sysutils/portsupgrade. > > > > Best of luck, > > > > Andrew Gould > > Perhaps I am confused about the terminology here - by "packages" I mean > precompiled programs, and by "ports" I mean source code & make files for > the same programs. > > I want to keep my programs up to date, and I want to use precompiled > versions as much as possible because it can take hours to compile a large > program. However some programs don't have packages, or the packages won't > install because I have used the ports system and other, required, programs > are out of sync. > > If I use `portupgrade -PP` (i.e. forcing it to use packages) it (almost) > always fails because there are never precompiled packages of the same > version as my (cvsup'ed) ports tree. > > In the same way, `portupgrade -P` (i.e. try to use packages) is equivalent > to `portupgrade` (i.e. compile from source) because of the version lag in > the packages as compared to the ports. > > One solution might be to get cvsup to check out slightly older versions of > the port tree that matches up with the available packages. However this > doesn't seem possible. > > Rich Portupgrade uses the package database of installed applications, which (to my knowledge) doesn't care/know whether the package was installed from a binary or from the port system. This assumes that the binary package registered the application with the package database. If you're using third-party, binary packages that do not register themselves with the package database, keeping applications in sync will probably become a manual process. 'portupgrade -arRP' will upgrade all of the installed packages where it can find a binary package or the related port, with a preference for binary packages. If it completes successfully, your packages (binary and port) should be in sync. As long as you don't update your ports tree, it should be easy to keep them in sync. Yes, this can take a long time. To shorten the process, I pkg_delete Open Office and few other huge packages prior to portupgrade. I then manually install the newer binaries after everything else has been upgraded. Also, if you recompile the system and kernel, your entire system will be in sync! Best of luck, Andrew Gould