I am extremely frustrated with the ~11000 ebuilds not invoking epatch_user. Therefore I propose a new ebuild stage - src_patch. All patching should be moved from src_prepare to src_patch. 1. src_unpack 2. src_patch 3. epatch_user 4. src_prepare 5. src_configure 6. src_compile 7. src_test? 8. src_install epatch_user is done after src_patch because user patches may revert ones in the tree. Also it's done before src_prepare because the user patches may modify configure.ac/Makefile.am/other files used during src_prepare. Also, ebuilds may use EPATCH= with their own src_prepare. Reproducible: Always
s/EPATCH=/PATCHES=/ sorry
The crucial point is that a substitute for epatch has to be included in the package manager. The lack of an implementation for this was the reason that PM support for epatch_user didn't make it into EAPI 5, see <http://wiki.gentoo.org/wiki/EAPI_5_tentative_features>. Closing as duplicate of bug 463768, because it makes more sense to discuss the issue at one single place. (Besides, introducing a new phase function in the next EAPI won't fix any of the existing ebuilds.) *** This bug has been marked as a duplicate of bug 463768 ***