* Previdi Roberto <previdi.robe...@gmail.com> [27.07.2009 13:07]: > 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) > > #!/bin/sh > for i in $(find /usr/bin/*); do > broken=$(ldd $i | grep "not found") > if [ "$broken" != "" ]; then > echo $i: $broken > fi > done > > 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 ...) > -- > roby
> _______________________________________________ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community Nice script. You can use regex to search the package: LIB=$(echo $broken | awk '{print $2}') PKG=$(opkg search */${LIB} | awk '{print $1}') opkg install $PKG or build a list of packages and install them at the end of the script regards, Frederik -- IRC: playya @ Freenode, Gimpnet xmpp: pla...@draugr.de
signature.asc
Description: Digital signature
_______________________________________________ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community