> Right now we have support in some packages for user patches - those being
> patches dropped into /etc/portage/patches/pkgname/ - which are
> automatically applied.  Because this feature is implemented by
> epatch_user() in
> eutils.eclass, it is only available for ebuilds that inherit eutils and
> explicitly call epatch_user or inherit another eclass that calls it in an
> exported phase (eg. base).  The end result is a very inconsistent
> experience, where user patches may or may not work not only on a
> package-by-package basis, but ebuild-by-ebuild.
> 
> Is there any reason why this couldn't just be done in the package manager,
> making user patches available for all ebuilds without code changes?

Well as people have already pointed out, the problem is where to place it:
* before src_prepare is bad because of gentoo-patches
* after src_prepare is bad because of eautoreconf calls in src_prepare

I would even suggest a more radical approach, namely (for an upcoming EAPI) to 
migrate some of the features of base.eclass into the package manager. Applying 
patches is a universal problem which should be handled as central as possible.

As example, (in that future EAPI)
* have patches from the PATCHES array be applied automatically _before_ 
src_prepare (the same way as done currently in base_src_prepare)
* have user patches applied afterwards (either if a FEATURE is set, or 
generally)
* disallow or deprecate at least direct calls to epatch, to ensure ordering
* (and adapt the functions in base and eutils accordingly for that EAPI)

Opinions?

Best, Andreas

-- 

Andreas K. Huettel
Gentoo Linux developer 
dilfri...@gentoo.org
http://www.akhuettel.de/

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to