From: Nekun <nekokun@firemail.cc>
To: gentoo-portage-dev@lists.gentoo.org
Subject: [gentoo-portage-dev] [PATCH] man/portage.5: Add userpatch documentation
Date: Sat, 10 Apr 2021 05:38:28 +0000 [thread overview]
Message-ID: <20210410053828.9480-1-nekokun@firemail.cc> (raw)
Signed-off-by: Nekun <nekokun@firemail.cc>
---
// seems like previous message has wrong Message-Id, resending
Starting from EAPI6, this is a built-in Portage functionality, maybe it
was not included in Portage documentation eralier because it was epatch.eclass
functionality which is exclusive for gentoo repo, but according with today's
mandatory "eapply_user" it should be here.
man/portage.5 | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/man/portage.5 b/man/portage.5
index 247ec5ab0..083abd77e 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,24 @@ 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
+
+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".
+
+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
next reply other threads:[~2021-04-10 5:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-10 5:38 Nekun [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-04-10 4:30 [gentoo-portage-dev] [PATCH] man/portage.5: Add userpatch documentation Nekun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210410053828.9480-1-nekokun@firemail.cc \
--to=nekokun@firemail.cc \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox