Gentoo Archives: gentoo-portage-dev

From: Nekun <nekokun@××××××××.cc>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH] man/portage.5: Add userpatch documentation
Date: Sat, 10 Apr 2021 05:38:38
Message-Id: 20210410053828.9480-1-nekokun@firemail.cc
1 Signed-off-by: Nekun <nekokun@××××××××.cc>
2 ---
3 // seems like previous message has wrong Message-Id, resending
4 Starting from EAPI6, this is a built-in Portage functionality, maybe it
5 was not included in Portage documentation eralier because it was epatch.eclass
6 functionality which is exclusive for gentoo repo, but according with today's
7 mandatory "eapply_user" it should be here.
8
9 man/portage.5 | 21 +++++++++++++++++++++
10 1 file changed, 21 insertions(+)
11
12 diff --git a/man/portage.5 b/man/portage.5
13 index 247ec5ab0..083abd77e 100644
14 --- a/man/portage.5
15 +++ b/man/portage.5
16 @@ -78,6 +78,9 @@ site-specific overrides of \fB/etc/portage/make.profile/\fR
17 .BR /etc/portage/sets/
18 user\-defined package sets
19 .TP
20 +.BR /etc/portage/patches/
21 +user-provided patches to packages
22 +.TP
23 .BR /var/db/repos/gentoo/
24 .nf
25 sets.conf
26 @@ -1375,6 +1378,24 @@ Also see \fB/var/lib/portage/world_sets\fR and the \fBemerge\fR(1)
27 \fB\-\-list\-sets\fR option.
28 .RE
29 .TP
30 +.BR /etc/portage/patches/
31 +.RS
32 +In this directory patches to the package source tree can be created.
33 +For each package, patches are taken from these subdirectories in the following order:
34 +.nr step 1 1
35 +.IP \n[step]. 3
36 +/etc/portage/patches/${CATEGORY}/${P}-${PR}[:${SLOT}]
37 +.IP \n+[step].
38 +/etc/portage/patches/${CATEGORY}/${P}[:${SLOT}]
39 +.IP \n+[step].
40 +/etc/portage/patches/${CATEGORY}/${PN}[:${SLOT}]
41 +.RE 2
42 +
43 +More-specific directories overrides less-specific, i.e. if more than one directory for the same package coexist, only patches from directory matches the first matching pattern will be applied. Patches for each package are applied in the POSIX lexicographic order. Patch file name must end in ".patch" or, for \fBEAPI\fR >= \fB6\fR, in ".diff".
44 +
45 +If package ebuild uses \fBEAPI\fR <= \fB5\fR, it must explicitly invoke \fBepatch_user\fR or inherit \fBepatch.eclass\fR(5) and rely on default \fBsrc_prepare\fR for apply patches. Otherwise, patches are silently ignored. If package ebuild uses \fBEAPI\fR >= \fB6\fR, applying user patches is mandatory.
46 +.RE
47 +.TP
48 .BR /var/db/repos/gentoo/
49 .RS
50 .TP
51 --
52 2.26.3