Setting PORTAGE_TMPDIR to "/var/tmp/my funny tmpdir" makes epatch fail miserably, see attached build.log. Line 1751 in temp/environment corresponds to the line: for x in ${EPATCH_SOURCE} in function epatch. Also diefunc() seems to have some problems of its own.
Created attachment 137611 [details] build.log
the lack of whitespace around EPATCH_SOURCE is to allow for wildcards ... but we'll have to split up the logic into separate variables to account for whitespace
Created attachment 212514 [details] eutils-epatch.eclass i wanted to fix something in epatch related to logging and it ended up being easier to rewrite it; by that point, i might as well rewrite the whole thing and fix a whole bunch of things that have always annoyed me; by *that* point, i might as well fix this bug too no diff since pretty much every line has changed. i'll commit if i dont notice breakage on my machine for a little while
A quick review reveals no insanity.
committed then after a few more tweaks http://sources.gentoo.org/eclass/eutils.eclass?r1=1.324&r2=1.325