Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jul 1999 23:05:14 -0700 (PDT)
From:      asami@FreeBSD.ORG (Satoshi - Ports Wraith - Asami)
To:        jread@semiotek.com
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: Can I automatically upgrade a large number of ports?
Message-ID:  <199907310605.XAA05129@bubble.didi.com>
In-Reply-To: <19990730032920.A17314@semiotek.com> (message from Justin Wells on Fri, 30 Jul 1999 03:29:20 -0400)

next in thread | previous in thread | raw e-mail | index | archive | help
 * From: Justin Wells <jread@semiotek.com>

 * I first posted this to freebsd-questions, but nobody there seemed to 
 * know the answer.

Nobody here does, either.  Or we would have fixed it already. :)

 * I just supped my ports collection again, and once again used pkg_version 
 * to extract a list of all the ports that had changed, selected some, and 
 * manually upgraded them by doing a pkg_delete and a make install.
 * 
 * Boy this is tedious.

Yes.  This is one of the glaring weaknesses of the FreeBSD Ports
Collection.  I'm not sure if anybody else (meaning other OS's) really
solved this problem though.  Does anyone know?

 * I would like to issue a single command that goes off and grabs the 
 * newest ports, finds out what I have installed that is now obsolete, 
 * and upgrades just those packages. If it can't do every single package
 * well ok--if it can do the majority that would be great (I know 
 * pkg_version doesn't accurately assess everything, but it gets most
 * of it right). 
 * 
 * I tried writing a script to do this, based on pkg_version, but it 
 * turned out to be dangerous and difficult:

First, I'd like to suggest you stop thinking in terms of pkg_* and
bsd.port.mk.  There are limitations of the tools themselves as well as 
fundamental problems.  Without deciding what ought to be done in all
cases, we can't even start designing the solution.

 *    -- I don't want to pkg_delete until I know that I've got the 
 *       new version all compiled and configured; otherwise I might 
 *       wipe out something important. pkg_delete complains anyway if
 *       I try to do this

Here's dillemma #1 -- you can't really test the new version until it's 
all installed and (ideally) configured.  Most ports currently won't
support this, as they will overwrite many files from the old version.

One solution to this is to install ports into separate hierarchies
(/usr/local/.pkg/${PKGNAME} or some such) and use symlinks to refer to 
them from the main tree.  GNU stow is one way to implement stuff like
this, wasn't someone looking at it?

 *    -- If I don't run pkg_delete then I get multiple versions of the 
 *       same port installed, one over the other. The package database 
 *       gets all messed up, and worse yet, pkg_version stops reporting
 *       useful information about that port (too many versions installed).

This is just an artifact of the problem above plus the shortcoming of
the current implementation of package tools.  I wouldn't worry about
it too much if we can solve the first one.

 *    -- It's tricky relating a package name back to a directory in 
 *       /usr/ports. Are they guaranteed to be unique? Can I do a 
 *       cd /usr/ports/*/rsync and be sure there will never, ever 
 *       be a /usr/ports/games/rsync as well as the one I want?

No, there are currently many language-specific ports that have the
same directory name as the original as someone else pointed out.
However, it shouldn't be hard to add this information in the pkg
metadata if necessary.

 * Anyway, it seems like I should be able to do:
 * 
 *      cd /usr/ports
 *      cvsup supfile
 *      make install_upgrades
 * 
 * and have it all taken care of. Is there a way?

Let's work together for it. :)

Satoshi


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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