the java-config, gcc, perl, grep, python-config functions all contain unbalanced quotes. patch attached.
Created attachment 33713 [details, diff] fix for described bugs
Actually, the missing statements are still screwed up. say grep is missing- `type -p grep || echo "missing: grep"` "$@" so, bash ends up w/ this line (which it tries to execute) "missing: grep $@" ...and... bash complains that it can't find the binary 'missing', rather then echoing a "sorry, but you borked your system something fierce and I couldn't find grep. Can we still be friends?" g_bin=`type -p grep` if [ $? != 0 ]; then echo "missing: grep $@" >&2 else $g_bin "$@" fi is the correct way of doing this, although you'll probably want to tag a non-zero return to the missing binary portion.
Worth taking a look at bug #54652, it has a generic QA interceptor generation setup abusing eval. Also, the interceptors (at least for >=.51_pre10) aren't ever enabled due to a EBUILD_PHASE bug.
Long since fixed, closing...