okay, so I spent most of the afternoon/evening hacking on a tool to extract "real" reverse dependencies for files.
It takes a list of files as input, and returns a list of files the first list "need" to run.
Currently it covers libraries/binaries (elf, using ldd ) scripts #!/... ( file + head+grep magic ) and python "import" lines ( more magic)
it will miss conditional depends in python, it doesn't support perl yet ( I dont know how to extract the perl include path, or the mapping of module->filename in perl ) so thats necessary.
Basically, you can take this, feed it a package's installed files, resolve the output to packages, and compare the "real" dependencies to the "theoretical" ones. If "theoretical" missess something, its bad.
Appears though that ferringb made something similar to the ldd hack for the next generation portage (still in cvs ) that will work on libraries/binaries.
However, my code is here:
on the gentoo cvs