Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Making user patches globally available
Date: Sun, 15 Apr 2012 08:37:21
Message-Id: 4F8A885C.3050508@gentoo.org
In Reply to: [gentoo-dev] Making user patches globally available by Ryan Hill
1 On 04/15/2012 01:16 AM, Ryan Hill wrote:
2 > Right now we have support in some packages for user patches - those being
3 > patches dropped into /etc/portage/patches/pkgname/ - which are automatically
4 > applied. Because this feature is implemented by epatch_user() in
5 > eutils.eclass, it is only available for ebuilds that inherit eutils and
6 > explicitly call epatch_user or inherit another eclass that calls it in an
7 > exported phase (eg. base). The end result is a very inconsistent experience,
8 > where user patches may or may not work not only on a package-by-package
9 > basis, but ebuild-by-ebuild.
10 >
11 > Is there any reason why this couldn't just be done in the package manager,
12 > making user patches available for all ebuilds without code changes?
13
14 Funtoo has support for FEATURES=localpatch, which does the epatch_user
15 thing before src_prepare. I think it should really go after src_prepare,
16 in order to apply patches after those that src_prepare may apply
17 (avoiding possible conflicts).
18
19 The reason that Funtoo's FEATURES=localpatch applies patches before
20 src_prepare is that it's common for eautoreconf to be called inside
21 src_prepare, and applying patches after src_prepare can create a need to
22 call eautoreconf a second time.
23 --
24 Thanks,
25 Zac

Replies