public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] man/portage.5: Add userpatch documentation
@ 2021-04-10  4:30 Nekun
  0 siblings, 0 replies; 2+ messages in thread
From: Nekun @ 2021-04-10  4:30 UTC (permalink / raw
  To: gentoo-portage-dev

Signed-off-by: Nekun <nekokun@firemail.cc>
---
Starting from EAPI6, this is a built-in Portage functionality, maybe it 
was not included in Portage documentation earlier 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-portage-dev] [PATCH] man/portage.5: Add userpatch documentation
@ 2021-04-10  5:38 Nekun
  0 siblings, 0 replies; 2+ messages in thread
From: Nekun @ 2021-04-10  5:38 UTC (permalink / raw
  To: gentoo-portage-dev

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-10  5:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-10  5:38 [gentoo-portage-dev] [PATCH] man/portage.5: Add userpatch documentation Nekun
  -- strict thread matches above, loose matches on Subject: below --
2021-04-10  4:30 Nekun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox