All files port doesn't provide

Rainer Müller raimue at macports.org
Sun Sep 5 20:36:10 PDT 2010


On 2010-09-06 02:14 , Dan Ports wrote:
> I've done this with
>   find /opt/local | xargs port provides | grep "not provided by"

You should also use -print0 to handle file names with spaces, and I also
added awk to see the first column (the file name) only.

This will also match all files which are part of MacPorts base. And even
worse, a lot of files in /opt/local/var/macports/ are for internal use
only, e.g. images and build directories.

But I also can't come up with anything better than adding a few more
grep -v calls to the pipeline to filter out unwanted files.

PREFIX=/opt/local;
find $PREFIX -type f -print0 |xargs -0 port -q provides |grep -v -E
"^$PREFIX/(var|share)/macports/|^$PREFIX/bin/port(|f|index|mirror)|^$PREFIX/bin/daemondo|^$PREFIX/share/man/man./(port\\.1|macports\\.conf\\.5|port(file|group|hier|style)\\.7).gz"
|grep 'not provided by' |awk '{print $1}'

I did not exclude $PREFIX/etc/macports/ as it might contain changes by
the user.

Rainer


More information about the macports-users mailing list