checking a file's dependents/cies?

René J.V. Bertin rjvbertin at gmail.com
Tue Aug 30 04:14:27 PDT 2016


On Tuesday August 30 2016 13:01:28 Rainer Müller wrote:

Hi,

> You can recreate that with the subset of relevant files to get the
> information you want, you can get the list of files in recursive
> dependents of the port providing the library you are interested in
> and then check if they link against this library.
> 
> For example for liblzma provided by the xz port:
> 
> lib=/opt/local/lib/liblzma.dylib
> port -q contents rdependentof:$(port -q provides $lib |awk '{print $5}') \
>   | grep /bin/ \
>   | while read bin; do
>       otool -L $bin | grep -q liblzma && echo $bin
>   done

Ah, great, thanks. A pity `port provides` still doesn't work for me but fortunately I rarely need to do this kind of operation on a file of which I don't know what port it belongs to.

R.


More information about the macports-dev mailing list