"sudo port upgrade outdated" fills HDD

Ryan Schmidt ryandesign at macports.org
Wed Feb 17 18:44:21 PST 2010


On Feb 17, 2010, at 20:29, Sam Kuper wrote:

> Maybe so. I wasn't aware of boost before it made my Mac fall over, so I can't claim any intimate knowledge of it. My gut instinct, though, is that especially for packages handled by a package manager and intended to provide limited functionality and to work with other such packages, small is beautiful. Isn't that the first principle of the Unix philosophy?
> 
> Can't boost be broken up into smaller packages and offered that way, so that only the needed parts of boost are fetched and installed when needed?

I don't know if that's possible for boost. If you're interested you could consult the boost documentation or ask their developers what the options are for compiling it, or speak with the MacPorts boost maintainer.


> I'm using port_cutleaves now. It's a bit like playing whack-a-mole. As soon as you cut off a leaf you no longer want, there's another one (or two, or three...) just below it in the dependency graph. Hence my question here:
> 
> http://lists.macosforge.org/pipermail/macports-users/2010-February/019005.html

The answer to the question:

>> Is there a way to uninstall CC such that BB automatically gets uninstalled

>> too, but AA is left intact because it is depended upon by DD?


Is: uninstall the port CC. Then run port_cutleaves. When it suggests that you may want to uninstall BB, confirm this by typing "u" for uninstall.


> though I now realise that an assumption I had been making - that it's only leaf nodes and their dependencies that one cares about - is false. Using port_cutleaves for long enough, one comes across newly-revealed leaves which one wants to keep! (Thanks for your answer to that question, btw!)
> 
> I guess a better solution would be to somehow have MacPorts or port_cutleaves be aware of which ports had had their installation requested by a user, and to have port_cutleaves have the option only to list those leaves and to automatically uninstall them and everything below on the dependency branch, if requested.

Yeah. Since MacPorts doesn't remember that at present, port_cutleaves has a handy feature where you can record this list of ports yourself, as regular expressions, in a text file called .port_leaves.exclude in your home directory. A few lines from my .port_leaves.exclude file:

^graphviz
^grep 
^gv 
^gzip 
^ImageMagick 
^q 

Note that I begin each line with "^" (regular expression syntax for anchor to beginning of line) and end each with a space (because the regular expression will end up matching something similar to the output of "port installed", which includes not only the port name but also the version and variants, separated from the port name by a space). I end each line with a space, for example "^q ", because I want to keep the port "q" but don't want to also keep every other port whose name begins with "q". For some ports, though, I don't end with a space: e.g. I use "^graphviz" because I want to keep all graphviz-related ports because I'm the maintainer of all of them.



More information about the macports-users mailing list