Uninstall a port and ONLY THAT PORT's dependencies?

Craig Treleaven ctreleaven at macports.org
Tue Oct 3 15:12:44 UTC 2017


> On Oct 2, 2017, at 6:47 PM, Dave Horsfall <dave at horsfall.org> wrote:
> 
> On Sun, 1 Oct 2017, Ryan Schmidt wrote:
> 
>>> Err, I'd be wary of that on my box.  The output includes things like "xv", "aspell", "awstats", "enscript", "gdb", "groff", "gzip" etc (and that's just a start).
>>> 
>>> Yeah, I can set them as requested, but why so many of them?  I might miss a few, and delete something I wanted.
>> 
>> I don't know what to tell you. As far as MacPorts knows, you did not request the installation of those ports, and nothing you've installed declares a library or runtime dependency on them, so it's safe to uninstall them. If you actually want any of those ports specifically, use "sudo port setrequested" to inform MacPorts of that desire.
> 
> Then MacPorts is plainly wrong, so you could start by admitting that MacPorts may have a problem here.
> 
> I most certainly *did* get them from MacPorts; where else would I have
> found them?  And it most certainly is *not* safe to remove them, because
> I use them all the time (why else would I install them?).
> 
> In other words, I appear to have stumbled across an obscure MacPorts bug, yet not having enough information on hand to be able to report it properly; I merely pointed out that your claim is demonstrably incorrect.
> 
> I seem to recall pointing out another MacPorts glitch, whereby some files
> suddenly disappeared after an update; I never did figure out why, but it
> never happened again.
> 
> I may be fairly new to the Mac world (hence I religiously do everything by the book), but I do have over 40 years experience of bug-hunting.

The ports listed above are show “correctly” as leaves.  Take an example I’m familiar with: my mythtv ports.  They always have to be built from source and use yasm for the assembler code.  After mythtv is installed, the yasm port will also have been installed and will likely show as a leaf.  (It WILL show as a leaf unless you specifically installed it for other reasons.)  A mythtv user can safely uninstall yasm since it was only needed at build time; not run time.

However, it is certainly possible that an individual port is buggy in that it has an undeclared run time dependency on a another port.  As a port maintainer, it is easy to miss that something is used at both build time and run time.  It is also trivial to fix, if reported.

HTH,

Craig



More information about the macports-users mailing list