summaryrefslogtreecommitdiff
blob: e501965fd8d09c244e085c0a5d17b00041f626c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
if [ ! -f /usr/sbin/qpkg ]; then
	echo "qpkg not found, will emerge gentoolkit"
	emerge gentoolkit
fi
rm -f /tmp/pngstuff.*
echo "Scanning libraries. do not be alarmed of error messages"

find /usr/lib -type f | while read LIB; do
	ldd "${LIB}" | grep "libpng.so.2"  && /usr/sbin/qpkg -nc -f "${LIB}" >>/tmp/pngstuff.libs
done
cat /tmp/pngstuff.libs |sort | uniq |  sed 's:\(.*/.*\)-[0-9]\+.*:\1:g' >/tmp/pngstuff.libs.rebuild
echo "You will now need to rebuild the following packages"
echo "------------"
cat /tmp/pngstuff.libs.rebuild
echo "------------"
cat /tmp/pngstuff.libs.rebuild | while read PACK; do emerge ${PACK}; done
echo "--- Done with libraries ---"


echo "scanning /usr do not be alarmed of error messages"
find /usr -type f| while read FOO; do
	ldd "${FOO}" | grep libpng.so.2  && /usr/sbin/qpkg -nc -f ${FOO} >>/tmp/pngstuff.bins
done


cat /tmp/pngstuff.bins |sort | uniq | sed 's:\(.*/.*\)-[0-9]\+.*:\1:g' >/tmp/pngstuff.bins.rebuild
echo "You will now need to rebuild the following packages"
echo "-----------"
cat /tmp/pngstuff.bins.rebuild
echo "-----------"
cat /tmp/pngstuff.bins.rebuild | while read PACK; do emerge ${PACK}; done
echo "done, deleting tempfiles"
rm -f /tmp/pngstuff.*