> emerge --info | grep PORTAGE_TMPDIR PORTAGE_TMPDIR="/usr/PORTAGE_TMPDIR" In this case, the line rm -fR ${D}/$(echo ${D} | awk -F / '{print $2}') removes everything that should have been installed, by removing $D/usr Suggestion: remove it only if echo $D | grep -qv /usr/ It seems to be harmless to not remove it, maybe print an "einfo" message.
Sorry, I don't understand. What's your PORTAGE_TMPDIR? PORTAGE_TMPDIR="/usr/PORTAGE_TMPDIR" does't make any sense.
My $PORTAGE_TMPDIR is /usr/PORTAGE_TMPDIR/ to make bash-completion help me remember the variable name and the X buffer help me spell it (this was before I put it in /etc/make.conf). But it doesn't matter, what matters is that $PORTAGE_TMPDIR starts with /usr/. I tried a link /var/tmp/PORTAGE_TMPDIR/ -> /usr/PORTAGE_TMPDIR/, but the link is resolved before $D is set.
reopening
fixed in 1.3.4-r1, thanks for reporting.