Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 2004 10:26:06 -0500
From:      "Andrew L. Gould" <algould@datawok.com>
To:        Richard Bradley <rtb27@cam.ac.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Keeping Ports synchronised with Packages
Message-ID:  <200404221026.06758.algould@datawok.com>
In-Reply-To: <200404221550.58040.rtb27@cam.ac.uk>
References:  <200404221341.17612.rtb27@cam.ac.uk> <200404220925.09931.algould@datawok.com> <200404221550.58040.rtb27@cam.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 22 April 2004 09:50 am, Richard Bradley wrote:
> On Thursday 22 April 2004 3:25 pm, Andrew L. Gould wrote:
> > On Thursday 22 April 2004 08:57 am, Richard Bradley wrote:
>
> ...
>
> > > 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.
>
> ...
>
> > > 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.
>
> ...
>
> > 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.
>
> Yep.
>
> > '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.
>
> If I don't update the ports tree, won't portupgrade look for the old
> versions of programs? Without updating the ports, portupgrade won't have
> anything to do, as all my programs would appear to be the current version.
> Wouldn't they?
>

This advice was assuming that your ports tree we more current than some of 
your packages.  This could occur if you updated your ports tree after you 
installed some packages.  In such a case, portupgrade would upgrade the older 
packages to the versions currently in your ports tree.

> > Also, if you recompile the system and kernel, your entire system will be
> > in sync!
>
> That would take _days_! Perhaps this is ok for a server, but I am trying to
> use FreeBSD as a desktop system here. It's taking me all afternoon to
> re-install eclipse (you have to compile java) as things stand.

You could use the '-n' option to have portupgrade give you a report on which 
packages need upgrading without actually doing any upgrading.  Then, rather 
than use the '-a' option for all packages, you could name specific packages 
to upgrade.  You'll probably still want to use the '-rR' options to sync 
dependencies.  See 'man portupgrade' and:

http://www.onlamp.com/pub/a/bsd/2003/08/28/FreeBSD_Basics.html

> Rich

There is certainly a cost/benefit trade-off when you want to use more current 
applications than were included in the latest release.  After your next 
upgrade of FreeBSD, I would advise that you cvsup your system from the 
SECURITY branch and refuse updates for ports.  In the url below, you will 
find directories of binary packages that are specific to various releases:

ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/

Andrew Gould



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404221026.06758.algould>