This is just an idea which come to mind. Such a check would be quite useful. If I remember right there was a file cleaning effort some time ago, so a script probably already exists.
http://qasl.de/~idl0r/gentoo_unused_files-beta.pl But I think it is nearly impossible to cover all and esp. without false-positives.
try running it in binutils/gcc/glibc dirs. files are used in tricky ways, and sometimes only referred to by eclasses/eblits ...
The check does not need to be 100% correct as this seems to be impossible or only doable with a huge effort. An option to turn on which shows possible unused files would be nice though.
Maybe we should add a new metadata variable for declaring which files are used inside $FILESDIR. We could make this variable retroactive for all EAPIs like we did with PROPERTIES. In addition to QA, this new variable would be useful for things like bug 303403.
it's hard to say how useful this is
*** Bug 343657 has been marked as a duplicate of this bug. ***