Excluding packages from MacPorts operations
July 14, 2009 | Code
As much as I’d like to jump whole hog on the PHP 5.3 bandwagon I just haven’t had the time to read up on the compatibility issues not work out what I’d need to do to maintain a PHP 5.2 and a PHP 5.3 environment on my computer. For now I’ll just be sticking with PHP 5.2.x.
This creates a problem, though, as MacPorts constantly lists my PHP 5.2 as outdated.
While I don’t want to upgrade to PHP 5.3 right away, I still want to have a quick and easy upgrade of everything else that I have installed. There’s not any clear documentation about excluding ports from a port command, but there is a tasty morsel in the port
man page.
Logical operators “and”, “or”, “not”, “!”, “(” and “)” may be used to combine individual portnames, port glob patterns and/or pseudo-portnames to construct complex port expressions that expand to the set of matching ports. For example:
port upgrade installed and apache*
port echo maintainer:jberry and uninstalled and \
( category:java and not commons* )
That means I can do this to exclude the PHP 5.3 upgrade until I’m ready:
sudo port upgrade outdated and not php*
A little less than optimal as I’d love to be able to modify a config file somewhere to effect this change on a global level but I’ll take this until that functionality gets added or until someone points me to where I might find that special config setting.
I could probably do something similar to my svn pre-/post-commit client side hooks hack, but I get the feeling that I’d forget about this one if I did it and end up cursing my computer later when it won’t install PHP 5.3
3 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
-
Thank you for the tip… I spent an hour or so combing the docs for this information.
-
Thanks for this! This shows up as one of the top google results for excluding updates in macports. I have an issue with mongo’s command-line tools and the newest version of Boost – and upgrade outdated not only reinstalls new Boost, but spends nearly 10 minutes compiling it. Thanks for the tip that helps me avoid this!
STRML, September 13, 2012 8:46 am | permalink
-
Thank you so much. Sooo did not want to rebuild octave every time I ran ‘upgrade outdated’.
Beni, March 8, 2014 10:08 pm | permalink
Comments are closed