Gentoo Portage. What exactly ‘revdep-rebuild’ command does

gentoo

I know it's necessary to run revdep-rebuild after upgrades of my Gentoo Linux.
I also kind-of understand that revdep-rebuild detects shared libraries conflicts and fixes them somehow. But I want to understand more.

If (hypothetically) I decide to do revdep-rebuild's job manually, how would I do it? How would I select all the binaries to test? How would I check if some particular binary is ok? If there is some problem with a binary – how would I know what package to re-emerge in order to fix it?

Best Answer

  1. First, you may find all executables.
  2. Then use ldd to find *.so dependencies.
  3. After that, if some shared object doesn't exist, use qfile to detect ebuild containing it.
  4. Finally, re-emerge all packages detected to be broken.
Related Question