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: clang-3.9 wrappers now broken on Snow Leopard

2017-10-02 Thread Ryan Schmidt

On Oct 2, 2017, at 07:18, Richard L. Hamilton wrote:

> The wrappers with the clang-3.9 port  that look like
> 
> #!/bin/bash
> 
> if [ -x /usr/bin/xcrun ] ; then
>exec /usr/bin/xcrun /opt/local/libexec/llvm-3.9/bin/clang "${@}"
> else
>exec /opt/local/libexec/llvm-3.9/bin/clang "${@}"
> fi
> 
> 
> have a problem on Snow Leopard:
> 
> myeye:tmp root# clang-mp-3.9 hello.c -o hello
> xcodebuild: error: invalid tool name - 
> '/opt/local/libexec/llvm-3.9/bin/clang' contains '/' characters
> /Developer-3.2.6/usr/bin/xcodebuild fails with 256 - Unknown error: 256
> 
> 
> I gather that in the past, they didn't attempt to use xcrun, which at the 
> very least, for the particular version of Xcode in use, doesn't seem to 
> appreciate full pathnames.
> 
> myeye:tmp root# xcode-select -print-path
> /Developer-3.2.6


Please do file a bug report for this in our issue tracker (if one has not 
already been filed).





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)…?

clang-3.9 wrappers now broken on Snow Leopard

2017-10-02 Thread Richard L. Hamilton
The wrappers with the clang-3.9 port  that look like

#!/bin/bash

if [ -x /usr/bin/xcrun ] ; then
exec /usr/bin/xcrun /opt/local/libexec/llvm-3.9/bin/clang "${@}"
else
exec /opt/local/libexec/llvm-3.9/bin/clang "${@}"
fi


have a problem on Snow Leopard:

myeye:tmp root# clang-mp-3.9 hello.c -o hello
xcodebuild: error: invalid tool name - '/opt/local/libexec/llvm-3.9/bin/clang' 
contains '/' characters
/Developer-3.2.6/usr/bin/xcodebuild fails with 256 - Unknown error: 256


I gather that in the past, they didn't attempt to use xcrun, which at the very 
least, for the particular version of Xcode in use, doesn't seem to appreciate 
full pathnames.

myeye:tmp root# xcode-select -print-path
/Developer-3.2.6



signature.asc
Description: Message signed with OpenPGP


Re: Something wrong with MacPorts package installer?

2017-10-02 Thread Dave Horsfall

On Sun, 1 Oct 2017, Ryan Schmidt wrote:

It is correct for things at the top level of your drive ("/") to be 
owned by root:wheel. Not sure why that wasn't the case for you before. I 
wasn't aware that our installer would fix the ownership of items at the 
top level of your drive. Maybe it's a feature of Apple's Installer.


Some of mine are root:admin (Sierra):

drwxrwxr-x+ 68 root  admin  2312 Sep 20 20:56 Applications
drwxrwxr-x@ 11 root  admin   374 Nov  2  2015 Developer
drwxr-xr-x+ 64 root  wheel  2176 Apr 11 09:57 Library
drwxr-xr-x@  2 root  wheel68 Jan  1  2001 Network
drwxr-xr-x@  4 root  wheel   136 Jul 21 15:13 System
lrwxr-xr-x   1 root  admin60 Mar 13  2010 User Guides And Information -> 
/Library/Documentation/User Guides and Information.localized
drwxr-xr-x   6 root  admin   204 Jan  8  2017 Users
drwxr-xr-x@  5 root  wheel   170 Oct  2 17:13 Volumes
drwxr-xr-x@ 38 root  wheel  1292 Jul 21 15:13 bin
drwxrwxr-t@  2 root  admin68 Sep 24 06:40 cores
dr-xr-xr-x   3 root  wheel  4229 Sep 30 17:02 dev
lrwxr-xr-x@  1 root  wheel11 Jan  1  2001 etc -> private/etc
dr-xr-xr-x   2 root  wheel 1 Sep 30 17:16 home
-rw-r--r--@  1 root  wheel   313 Jul 31  2016 installer.failurerequests
drwxr-xr-x   3 root  wheel   102 Aug 31 16:33 macOS_SDK
drwxr-xr-x   2 root  wheel68 Dec 15  2015 mnt
dr-xr-xr-x   2 root  wheel 1 Sep 30 17:16 net
drwxr-xr-x   4 root  admin   136 Oct 17  2014 opt
drwxr-xr-x@  6 root  wheel   204 Jan  1  2001 private
drwxr-xr-x@ 63 root  wheel  2142 Jul 21 15:13 sbin
lrwxr-xr-x@  1 root  wheel11 Jan  1  2001 tmp -> private/tmp
drwxr-xr-x@ 11 root  wheel   374 Apr 11 10:10 usr
lrwxr-xr-x@  1 root  wheel11 Jan  1  2001 var -> private/var

--
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 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