Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-04 Thread db
On 4 Oct 2017, at 06:00, Dave Horsfall  wrote:
> Someone (I've forgotten who) pointed out is was likely that I installed them 
> before MacPorts honoured the "requested" flag (I've had this MacBook for 
> quite a few years).

Are those ports listed in `port echo requested`?

Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-02 Thread Daniel J. Luke
On Oct 2, 2017, at 6:47 PM, Dave Horsfall  wrote:
> 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 suspect that in your case you simply have ports installed from before the 
'requested' flag was tracked by MacPorts (that's certainly behavior I've seen 
and is the main reason why I haven't personally used the 'requested' flag for 
anything). 

-- 
Daniel J. Luke





Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-02 Thread Rainer Müller
On 10/03/2017 02:12 AM, Carlo Tambuatco wrote:
> 
>> On Oct 2, 2017, at 2:24 AM, Mojca Miklavec > > wrote:
>>
>> Some ports may be installed as build dependencies. Or some ports you 
>> installed
>> now need different dependencies than they used to. Macports won't auto-notify
>> you when some dependencies are no longer needed, so ports may accumulate over
>> time.
>>
> 
> Sounds like a feature request to me...

MacPorts 2.4.0 already introduced the 'sudo port reclaim' command, which will
identify and uninstall unrequested ports that have no requested dependents.

However, the common tasks section in the guide could need some documentation and
examples for the new port action. Contributions welcome!

https://guide.macports.org/#using.common-tasks

Rainer


Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-02 Thread Dave Horsfall

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.


--
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-02 Thread db
On 2 Oct 2017, at 15:56, Carlo Tambuatco  wrote:
> Is —follow-dependencies smart enough to uninstall dep(A), but not dep(A,B,C)…?

From port's man page:
To uninstall portname and then recursively uninstall all ports it depended on, 
use --follow-dependencies. This will not uninstall dependencies that are marked 
as requested or that have other dependents.

Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-02 Thread Carlo Tambuatco

> On Oct 1, 2017, at 9:55 PM, Ryan Schmidt  wrote:
> 
> 
> On Oct 1, 2017, at 17:46, db wrote:
> 
>> On 1 Oct 2017, at 18:57, Ryan Schmidt wrote:
>>> On Oct 1, 2017, at 05:50, Carlo Tambuatco wrote:
 Is there a way to uninstall a port and only those ports that are 
 dependencies of just that port?
 So I want to uninstall port A and dependencies of A: dep(A) but not 
 dep(A,B,C,…) where 
 dep(A,B,C…) are dependencies of A and B and C, etc…
>>> Not particularly.
>> 
>> I thought --follow-dependencies was intended for such case.
> 
> Oh, I guess it is.
> 

Is —follow-dependencies smart enough to uninstall dep(A), but not dep(A,B,C)…?

Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-02 Thread Mojca Miklavec
2. okt. 2017 6:40 AM "Ryan Schmidt" wrote:


On Oct 1, 2017, at 17:35, Dave Horsfall 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).

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


Some ports may be installed as build dependencies. Or some ports you
installed now need different dependencies than they used to. Macports won't
auto-notify you when some dependencies are no longer needed, so ports may
accumulate over time.

Mojca


Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-01 Thread Ryan Schmidt

On Oct 1, 2017, at 17:35, Dave Horsfall wrote:

> On Sun, 1 Oct 2017, Ryan Schmidt wrote:
> 
>> Then you can run "port installed leaves" to show a list of the ports that 
>> are installed but that you have not requested. (If the list is inaccurate -- 
>> if ports are on the list that you actually want -- you can tell MacPorts by 
>> using "sudo port setrequested X" where X is the port you want to keep.) 
>> Then, once "port installed leaves" correctly represents the list of ports 
>> you don't want, you can uninstall them with "sudo port uninstall leaves".
> 
> 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.



Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-01 Thread Ryan Schmidt

On Oct 1, 2017, at 17:46, db wrote:

> On 1 Oct 2017, at 18:57, Ryan Schmidt wrote:
>> On Oct 1, 2017, at 05:50, Carlo Tambuatco wrote:
>>> Is there a way to uninstall a port and only those ports that are 
>>> dependencies of just that port?
>>> So I want to uninstall port A and dependencies of A: dep(A) but not 
>>> dep(A,B,C,…) where 
>>> dep(A,B,C…) are dependencies of A and B and C, etc…
>> Not particularly.
> 
> I thought --follow-dependencies was intended for such case.

Oh, I guess it is.



Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-01 Thread db
On 1 Oct 2017, at 18:57, Ryan Schmidt  wrote:
> On Oct 1, 2017, at 05:50, Carlo Tambuatco wrote:
>> Is there a way to uninstall a port and only those ports that are 
>> dependencies of just that port?
>> So I want to uninstall port A and dependencies of A: dep(A) but not 
>> dep(A,B,C,…) where 
>> dep(A,B,C…) are dependencies of A and B and C, etc…
> Not particularly.

I thought --follow-dependencies was intended for such case.

Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-01 Thread Dave Horsfall

On Sun, 1 Oct 2017, Ryan Schmidt wrote:

Then you can run "port installed leaves" to show a list of the ports 
that are installed but that you have not requested. (If the list is 
inaccurate -- if ports are on the list that you actually want -- you can 
tell MacPorts by using "sudo port setrequested X" where X is the port 
you want to keep.) Then, once "port installed leaves" correctly 
represents the list of ports you don't want, you can uninstall them with 
"sudo port uninstall leaves".


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.


--
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


Re: Uninstall a port and ONLY THAT PORT's dependencies?

2017-10-01 Thread Ryan Schmidt

On Oct 1, 2017, at 05:50, Carlo Tambuatco wrote:

> Is there a way to uninstall a port and only those ports that are dependencies 
> of just that port?
> 
> So I want to uninstall port A and dependencies of A: dep(A) but not 
> dep(A,B,C,…) where 
> dep(A,B,C…) are dependencies of A and B and C, etc…

Not particularly.

What you can do is uninstall port A.

Then you can run "port installed leaves" to show a list of the ports that are 
installed but that you have not requested. (If the list is inaccurate -- if 
ports are on the list that you actually want -- you can tell MacPorts by using 
"sudo port setrequested X" where X is the port you want to keep.) Then, once 
"port installed leaves" correctly represents the list of ports you don't want, 
you can uninstall them with "sudo port uninstall leaves".

You may need to repeat this several times, until the list is empty.