Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Auto-patching ebuilds themselves Was: Eclass vs EAPI For Utility Functions (Patching/etc)
Date: Sun, 15 Jun 2014 23:36:45
Message-Id: pan$4c193$5a45ad70$1335b484$60fc9f10@cox.net
In Reply to: [gentoo-dev] Eclass vs EAPI For Utility Functions (Patching/etc) by Rich Freeman
1 Rich Freeman posted on Sun, 15 Jun 2014 07:00:15 -0400 as excerpted:
2
3 > Besides, I think user-patches are a GREAT feature to have, and one I use
4 > all the time (without even thinking about it if a package with a patch
5 > gets rebuilt). As I said in the meeting, if we were selling Gentoo to
6 > make money, it would be the sort of feature that you'd advertise. Why
7 > make it hard to use such a distinctive advantage of a source-based
8 > distro?
9
10 Agreed with everything, but focusing on the above as a jump-off point
11 for...
12
13 A similarly great feature to have would be epatch-ebuild. Back when
14 gentoo/kde was trying to dump IUSE=semantic-desktop[1], I was doing
15 enough ebuild patching with enough churn in the ebuilds[2] that manual
16 per-ebuild patching was simply no longer feasible. It can be noted that
17 normal sources patching (as epatch) would NOT work here, at least not
18 easily, because it was the ebuilds themselves that were forcing the
19 various semantic-desktop related config options on and forcing
20 dependencies to match, so it was the ebuilds themselves that needed that
21 patched back out.
22
23 I ended up with an /etc/portage/patches.ebuild that mirrored
24 /etc/portage/patches in functionality, using a sync script that
25 download-updated both the gentoo tree and the layman-managed overlays,
26 then _automatically_ applied the patches from the patches.ebuild tree and
27 redigested the ebuilds[3], then regenerating cache to account for the
28 changes. The _automatic_ bit being critical as at that point I was
29 handling enough of them that doing it manually would not have been fun.
30
31 Talk about a feature worth advertising, the user-level ability to
32 automatically live-patch ebuilds by simply dropping a patch in the
33 appropriate location just like we do sources was and remains great,
34 definitely something I'd love to see in the PMs at some point. =:^)
35
36 As we've found with user-epatched sources, this should greatly simplify
37 deployment of experimental patches. Just attach the patch to the bug and
38 tell the user what directory to drop it in, and no more worries about
39 having to tell users what to edit or how to do manual patching, in
40 ordered to test a fix. =:^)
41
42 ---
43 [1] Dropping IUSE=semantic-desktop: Something I'm /ever/ so glad gentoo/
44 kde changed their minds on. =:^)
45
46 [2] The ebuilds in question were from the gentoo/kde overlay, before they
47 reached the tree. That overlay and the ebuilds in it get a *LOT* of
48 churn!
49
50 [3] Redigesting: As I run live-sources kde there were few source
51 tarballs to redigest, only the ebuilds.
52
53 --
54 Duncan - List replies preferred. No HTML msgs.
55 "Every nonfree program has a lord, a master --
56 and if you use the program, he is your master." Richard Stallman