Updating multiple ports with portmaster

b. f. bf1783 at googlemail.com
Sat Mar 26 23:42:36 UTC 2011

Matthias Andree wrote:
> >>   Is there a way to get portmaster to behave like portupgrade did and
> >>   only upgrade what needs to be upgraded?
> >>
> >
> > This is documented in the portmaster(1) manpage.  You can use -a to
> > update all ports that need to be updated.  To update a subset of
> > those, you could  (1) use -i with -a or a glob (by the way, the *
> > isn't needed with portmaster -- see the portmaster(1) manpage), and
> > respond in the negative to prompts to update or re-install those you
> > wish to exclude; (2) use -x with -a or a glob, to exclude certain
> > ports; or (3) feed portmaster a list of globs that match only those
> > ports that you want to be updated.  In your case, for (3), if you only
> > wanted to update those p5-* ports that need to be updated, but not
> > other ports that need to be updated, you could use something like:
> >
> > pkg_version -qos p5- -l '<' | xargs portmaster
> >
> > Of course, since some new versions of p5-* ports may depend upon new
> > versions of other, non p5-* ports, updating only the p5-* ports isn't
> > guaranteed to work.
> portmaster takes care of that, except if there are downstream

It tries to take care of it, and usually succeeds for (1) and (3).
But not necessarily for (2), if one of the ports that should be
updated is excluded.

> dependencies that stop working with updated ports on your list -- but
> that's rather rarely observed and usually documented in
> /usr/ports/UPDATING -- but even then, portmaster -a -i would likely help.

Yes, that's something that should also be taken into consideration.
Rarely, maybe, but more often than one would like -- and sometimes


More information about the freebsd-ports mailing list