#!/bin/bash if [ ! -f /usr/sbin/qpkg ]; then if [ ! -f /usr/bin/qpkg ]; then echo "qpkg not found, will emerge gentoolkit" emerge gentoolkit fi fi if [ -f /usr/sbin/qpkg ]; then QPKG=/usr/sbin/qpkg fi if [ -f /usr/bin/qpkg ]; then QPKG=/usr/bin/qpkg fi rm -f /tmp/mysqlstuff.* echo "Scanning libraries. do not be alarmed of error messages" find /usr/lib -type f -perm +u+x | while read LIB; do ldd "${LIB}" | grep -e "libnisam.a" -e "libmysys.a" -e "libmystrings.a" -e "libmysqlclient" \ -e "libmyisam" -e "libmerge.a" -e "libheap.a" -e "libdbug.a" && ${QPKG} -nc -f "${LIB}" >>/tmp/mysqlstuff.libs done cat /tmp/mysqlstuff.libs |sort | uniq | sed 's:\(.*/.*\)-[0-9]\+.*:\1:g' >/tmp/mysqlstuff.libs.rebuild echo "You will now need to rebuild the following packages" echo "------------" cat /tmp/mysqlstuff.libs.rebuild echo "------------" echo "--- Done with libraries ---" rm -f /tmp/mysqlstuff.*