Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 1999 04:41:54 -0400
From:      Justin Wells <jread@semiotek.com>
To:        freebsd-questions@freebsd.org
Subject:   automatic package upgrading
Message-ID:  <19990729044154.A16711@semiotek.com>

next in thread | raw e-mail | index | archive | help

I have a system with a large number of ports installed. Now I have 
done a cvsup on /usr/ports, and got a fresher version of the collection
available there. 

How do I upgrade all the ports I've already installed to the newer 
versions now available in /usr/ports?

I can use the /usr/ports/sysutils/pkg_version tool to find out which 
packages are potential candidates for upgrade, but I don't know how 
to issue a command to actually upgrade them. I've looked all through 
the documentation and found nothing--maybe I missed it, if so please
tell me where to look.

I did try writing a little shell script to parse the output of 
pkg_version and run "pkg_add -r $packageName" for all the packages
which need to be upgraded. However this is no good for two reasons:

    -- after the pkg_add the system thinks there are two versions
       of rsync installed, and pkg_version can't deal with that. 
       It no longer reports useful information about that package.

    -- i can't automatically run pkg_delete because it complains,
       for some packages, that other things depend on what I'm 
       deleting. 

    -- this installs binaries by downloading them from the FTP 
       site, whereas I would prefer to compile it myself in /ports. 
       this is not such a big deal, though, and I would accept a 
       viable pkg_add solution. 

So how do I go about upgrading all my installed packages to the newer
versions?

It seems to me that there should be a 

     cd /usr/ports
     make upgrade

to do this, which would first run "make update", and then compile 
and properly install just those ports which have already been 
installed, and for which there are newer versions available. It 
should properly deal with fixing up the version numbers in the 
database of installed packages.

Is this possible? Is there anything close to it?

Justin



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




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