Correct directory is /usr/share/X11/app-defaults but yet I keep seeing app-defaults installed in /usr/lib/X11/app-defaults, /etc/X11/app-defaults, /usr/X11R6/lib/app-defaults and so forth by multiple programs in tree in weekly basis which are relics from the past.
Maybe Portage could print a QA warning after install phase if it sees "app-defaults" directory installed to some other than /usr/share/X11/ ?
How about something a bit more abstract.
Basically have a 'path inspector' function. This could be python, or it could be a bash function from profile.bashrc (so we keep as much QA code outside of portage as we can) and this inspector function basically gets called after src_install or possibly after postinst (so the postinst doesn't screw with the paths or we don't scan things that get deleted?). We can call it once per file (probably expensive) or better yet call it in batches (don't want to hit the ARGV limit).
I don't like QA code in portage because while Zac can basically release portage versions relatively quickly he can't make developers upgrade to the new releases so older versions can contain QA-code bugs and then get angry at false positives, false negatives; if we continue to write QA code that ships with Gentoo-x86 fixing it once fixes it everywhere (alternatively; breaking it once also breaks it everywhere; but I assume it will be fixed relatively quickly.)
Looks like this is a duplicate of bug 273282 in fact.
*** This bug has been marked as a duplicate of bug 273282 ***