All files port doesn't provide

Bradley Giesbrecht brad at pixilla.com
Tue Sep 21 10:12:08 PDT 2010


On Sep 5, 2010, at 8:36 PM, Rainer Müller wrote:

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

Has there been discussions about adding MacPorts base files to the  
registry?

I think I like the idea.

// Brad


More information about the macports-users mailing list