When running revdep-rebuild there is a message "There are no dynamic links to <library>... All done." However, it appears that this statement is incorrect and removal of the apparently unused libraries causes problems. I got an emerge comment about running revdep-rebuild against libnss3.so.12 # revdep-rebuild --library libnss3.so.12 -pi * Configuring search environment for revdep-rebuild * Checking reverse dependencies * Packages containing binaries and libraries using libnss3.so.12 * will be emerged. * Collecting system binaries and libraries * Generated new 1_files.rr * Checking dynamic linking [ 100% ] * There are no dynamic links to libnss3.so.12... All done. So This library is unused? # find / -name libnss3.so.12 /usr/lib32/libnss3.so.12 /usr/lib64/libnss3.so.12 # mv /usr/lib64/libnss3.so.12 ~/libnss3.so.12_64 # mv /usr/lib32/libnss3.so.12 ~/libnss3.so.12_32 And to confirm: # revdep-rebuild -pi * Configuring search environment for revdep-rebuild * Checking reverse dependencies * Packages containing binaries and libraries broken by a package update * will be emerged. * Collecting system binaries and libraries * Generated new 1_files.rr * Collecting complete LD_LIBRARY_PATH * Generated new 2_ldpath.rr * Checking dynamic linking consistency [ 5% ] * broken /usr/bin/addbuiltin (requires libnss3.so) * broken /usr/bin/baddbdir (requires libnss3.so) [ 6% ] * broken /usr/bin/certutil (requires libnss3.so) * broken /usr/bin/checkcert (requires libnss3.so) [ 7% ] * broken /usr/bin/cmsutil (requires libnss3.so) * broken /usr/bin/crlutil (requires libnss3.so) [ 8% ] * broken /usr/bin/derdump (requires libnss3.so) * broken /usr/bin/digest (requires libnss3.so) [ 9% ] * broken /usr/bin/epiphany (requires libnss3.so) ... <snip> Does it now fail? $ crlutil crlutil: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory Upon restoring # mv ~/libnss3.so.12_64 /usr/lib64/libnss3.so.12 # mv ~/libnss3.so.12_32 /usr/lib32/libnss3.so.12 The programs seem to work fine crlutil Usage: crlutil -L [-n nickname] [-d keydir] [-P dbprefix] [-t crlType] ... <snip> (Since: "There are no dynamic links to libc.so... All done." can I remove that shared object since nothing links to it either?) Reproducible: Always
I suspect 'revdep-rebuild --library libnss3.so*' would give you the desired result.
revdep-rebuild is correct. nothing needs libnss3.so.12. its SONAME is actually libnss3.so, and that is what things are looking for. it is not possible for revdep-rebuild to search for every possible symlink pointing to a file you requested, and then do a search for those as well. run `revdep-rebuild libnss3.so` to get the desired results.