a script to find broken packages before they break you!

Previdi Roberto previdi.roberto at gmail.com
Mon Jul 27 13:06:12 CEST 2009

hello list. I wrote this little script taking inspiration from the powerful
gentoo command "revdep-rebuild". It scans all the binary files in /usr/bin
and shows the broken ones (the ones linking non existent library)

for i in $(find /usr/bin/*); do
        broken=$(ldd $i | grep "not found")
        if [ "$broken" != "" ]; then
                echo $i: $broken

i called it "/usr/local/bin/revdep-scan"
when you run it it prints an output like this:

/usr/bin/fsousaged: libfsoframework.so.0 => not found

i have also seen that you can issue an "opkg search missing_lib_path" to
find the package to reinstall, but you must pass the whole path, like
"/usr/lib/libfsoframework.so.0" for it to work, so i'm not able to guess it
automatically (i could just try /usr/lib ...)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/community/attachments/20090727/95dd3cf3/attachment.htm 

More information about the community mailing list