(no subject)
Ryan Schmidt
ryandesign at macports.org
Tue Jul 10 20:59:14 PDT 2007
On Jul 10, 2007, at 18:49, Chris Waterson wrote:
> Hi there! I've been using macports for some time now, and one thing
> that is frustrating is the fact that "port upgrade" leaves crufty old
> variants behind.
You mean: crufty old versions behind. "variants" has a different
meaning for MacPorts.
> I've tried:
>
> port -uR upgrade outdated
>
> in the hopes that "-u" would "uninstall non-active ports when
> upgrading and uninstalling" (as claimed by the man page) and that
> combining it with "-R" would "also upgrade dependents" (by which I was
> hoping "upgrade" meant "rebuild with the newer variant).
Here I don't know what you mean by "variant". If you're talking about
variants in the way that MacPorts defines that term, then "upgrade"
will only retain the set of variants with which you originally
installed the port. If you now want to have a different set of
variants on a port, then your only option is to completely uninstall
(or at least deactivate) the existing port, and then install it with
the variants you now want.
I wasn't familiar with -R. You're right, I see it's in the manpage.
But MacPorts follows dependencies by default, so I don't think you
need -R.
> This doesn't seem to be the case, but leads to lots of extra warnings
> during my upgrade, for example, the following (five times, or so):
>
> Error: Uninstall sqlite3 3.3.17_0+darwin_8 failed: Please
> uninstall the ports that depend on sqlite3 first.
> ---> Unable to uninstall sqlite3 3.3.17_0+darwin_8, the
> following ports depend on it:
> ---> apr-util
>
> At which point, for each piece of cruft, I wander through all the
> dependents by hand, uninstall each, then uninstall the old variant,
> then re-install each dependent.
>
> Surely I am doing something wrong. Can someone vend me a clue?
I recommend you do the following (substituting any other port name
for "sqlite3" as desired):
sudo port -u upgrade sqlite3
If you encounter an error that says it's required for other ports,
then force the upgrade:
sudo port -ufn upgrade sqlite3
If other ports depend on sqlite3, then you need to force (-f) the
uninstall. However, then you'll also want the nonrecursive flag (-n),
else MacPorts will rebuild all of sqlite3's dependencies too,
possibly even multiple times, which is just a waste of your time. The
latter is a bug:
http://trac.macosforge.org/projects/macports/ticket/10827
Since you normally do want MacPorts to follow dependencies if
necessary, you should always first try just upgrading with -u, and
only if that fails, switch to -unf.
The fact that apr-util is listed five times in your output instead of
once is also a bug:
http://trac.macosforge.org/projects/macports/ticket/8763
More information about the macports-users
mailing list