Signed-off-by: Nekun <neko...@firemail.cc> --- Also document eapply|eapply_user|PATCHES and fix override logic description
man/portage.5 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/man/portage.5 b/man/portage.5 index 247ec5ab0..257dc9d17 100644 --- a/man/portage.5 +++ b/man/portage.5 @@ -78,6 +78,9 @@ site-specific overrides of \fB/etc/portage/make.profile/\fR .BR /etc/portage/sets/ user\-defined package sets .TP +.BR /etc/portage/patches/ +user-provided patches to packages +.TP .BR /var/db/repos/gentoo/ .nf sets.conf @@ -1375,6 +1378,34 @@ Also see \fB/var/lib/portage/world_sets\fR and the \fBemerge\fR(1) \fB\-\-list\-sets\fR option. .RE .TP +.BR /etc/portage/patches/ +.RS +In this directory patches to the package source tree can be created. +For each package, patches are taken from these subdirectories in the +following order: +.nr step 1 1 +.IP \n[step]. 3 +/etc/portage/patches/${CATEGORY}/${P}-${PR}[:${SLOT}] +.IP \n+[step]. +/etc/portage/patches/${CATEGORY}/${P}[:${SLOT}] +.IP \n+[step]. +/etc/portage/patches/${CATEGORY}/${PN}[:${SLOT}] +.RE 2 + +Patches from more-specific directories overrides patches from less-specific, +i.e. if patches with the same name coexist in different directories matches +same package, only patch 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". + +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. +.RE +.TP .BR /var/db/repos/gentoo/ .RS .TP -- 2.26.3