It's often desirable to know which package provides a certain file. This can be done under the current system, of course. I the following script: #!/bin/zsh # Usage: whatprovides <filename> if [[ $1 != "" ]] { foreach file (`find /var/db/pkg/ -name CONTENTS \ -exec /bin/grep -l \`/usr/bin/md5sum $1\` \{\} \;`) { grep -l "$1" $file | awk -F / '{ print $5 "/" $6 }' } } So, whatprovides /usr/lib/libIDL-2.a returns dev-libs/libIDL-0.8.0 Which is nice and all, and pretty useful at times, too. Unfortunately, it's pretty ugly, and grepping through Portage's internal package database feels like something of a hack. It would be nice if emerge provided this functionality (``emerge whatprovides ...''), even if it was just a wrapper of something like the above.
heres something i emerge-d (gentoolkit) root@rux0r linux-2.4.19 # qpkg -f /usr/lib/libz.so sys-libs/zlib *
Wow. Discover something new every day :-) Thanks, that's a wonderfully useful toolkit.