portupgrade -- is there a way to only build and update ports that actually NEED it?

Matthew Seaman matthew at FreeBSD.org
Mon Jun 25 08:15:45 UTC 2012

On 25/06/2012 08:53, Dan Mahoney, System Admin wrote:
> I'm presently in the process of trying to do a portupgrade from rt-3.8.8
> to 3.8.13.  By all estimations, this is a minor bump.
> Already, I've encountered several annoyances due to ABI changes, such as
> the libtool2.4 fun.  With normal portupgrade, this forces you to go fix
> the dependent port.
> Finally, I just applied -r, which should update all dependent packages,
> but it seems to upgrade them unconditionally.
> Ergo, I've since built a new version of perl, a new verion of python,
> rebuilt every perl module on the system, am presently rebuilding
> apache22, and I'm sure the system will turn around and require me to
> rebuild postgres real soon.
> You would think there's an option to portupgrade that says "don't
> upgrade every single package I've got, but if somewhere in the
> dependency chain I need a newer version of a thing, then do it."
> Am I just missing it in the manpages, or does such a thing really not
> exist?

It has been many years since I used portupgrade with any regularity, and
many of those neurones have been recycled.  However, I do recall

   portupgrade -a should update all out-of-date ports on your system.

   portupgrade -r pkgname should update pkgname (if out of date) and
                  all packages that depend on pkgname.

   portupgrade -R pkgname should update everything that pkgname depends
                  on plus pkgname (if out of date).

'portupgrade -R' sounds like what you want.  I believe that the meaning
of the -r and -R flags in portupgrade is reversed from pkg_info(1) which
is annoyingly inconsistent.

Nowadays I usually use portmaster, where:

   portmaster pkgname

works equivalently to 'portupgrade -R pkgname' except that portmaster
/always/ reinstalls pkgname even if it is up to date.  ie. the standard
default action of portmaster is to do exactly what you want.



Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20120625/f39a107d/signature.pgp

More information about the freebsd-questions mailing list