I did: sudo nice port upgrade -u outdated
But this then results in many erros due to non-versioned dependencies:
---> Activating grace 5.1.20_0 Error: Activating grace 5.1.20_0 failed: Image error: Another version of this port (grace @5.1.18_0) is already active. ---> Fetching pango ---> Attempting to fetch pango-1.16.4.tar.bz2 from http:// mandril.creatis.insa-lyon.fr/linux/gnome.org/sources/pango/1.16 ---> Verifying checksum(s) for pango ---> Extracting pango ---> Applying patches to pango ---> Configuring pango ---> Building pango with target all ---> Staging pango into destroot ---> Unable to uninstall pango 1.16.2_0, the following ports depend on it: ---> graphviz ---> gtk2 Error: Uninstall pango 1.16.2_0 failed: Please uninstall the ports that depend on pango first. ---> Fetching sqlite3 ---> Attempting to fetch sqlite-3.3.17.tar.gz from http:// www.sqlite.org/ ---> Verifying checksum(s) for sqlite3 ---> Extracting sqlite3 ---> Applying patches to sqlite3 ---> Configuring sqlite3 ---> Building sqlite3 with target all ---> Staging sqlite3 into destroot ---> Unable to uninstall sqlite3 3.3.16_0+darwin_8, the following ports depend on it: ---> apr-util Error: Uninstall sqlite3 3.3.16_0+darwin_8 failed: Please uninstall the ports that depend on sqlite3 first.
Sorry, I forgot about the fact that -u goes through all the dependencies and tries to _uninstall_ as well as upgrading them, which will of course fail as you observed when ports that depend on them are installed (I think this is a good thing to save oneself from unintended consequences). One needs to add the -f flag to force it to uninstall ports even when they have there are ports installed that depend on them, and/or the -n flag to not upgrade dependencies of ports specified for upgrading (this saves multiple rebuilds of packages when outdated ports depend on the same package, as -u will otherwise rebuild it once for each such instance). I usually run "port -ufn upgrade outdated" myself. (See additional comment below.)
Therefore I say
sudo nice port upgrade outdated
which works for all (!) ports but grace:
---> Activating grace 5.1.20_0 Error: Activating grace 5.1.20_0 failed: Image error: Another version of this port (grace @5.1.18_0) is already active. ---> Deactivating pango 1.16.2_0 ---> Installing pango 1.16.4_0 ---> Activating pango 1.16.4_0 ---> Cleaning pango ---> Deactivating sqlite3 3.3.16_0+darwin_8 ---> Installing sqlite3 3.3.17_0+darwin_8 ---> Activating sqlite3 3.3.17_0+darwin_8 ---> Cleaning sqlite3
The reason I tend not to just run "port upgrade outdated" is that, as you've probably noticed, it leaves the older versions of the ports installed (though inactive); I suppose I'm comfortable with living on the edge a bit if it saves space on my laptop hard drive :-) As for the failure to upgrade grace here, I'm guessing that the reason was that, at the time you ran "port upgrade outdated", you had the two versions of grace already installed and port thought it only had to activate the newer one (which failed because the older one was already active), whereas you had only one version installed of each of the other ports, and so it did deactivated the old one before installing the new one. If this is what it did, then that looks to me like a bug. If you (or others reading this) would be so kind as to try to reproduce and confirm this (and then file it as a bug if you do), or otherwise figure out what is happening, that would be most helpful.
Btw, it would be nice to have "port upgrade -u" really work.
(See first comment above if you skipped it :-)
Anyway, thank all of you very much for your help and a beautiful system (MacPorts;)!
And thank you for your input to help us make it better! Kind regards, Maun Suang -- Boey Maun Suang (Boey is my surname) Email: boeyms@macports.org