From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-pms@lists.gentoo.org
Subject: [gentoo-pms] [PATCH 11/22] EAPI 6: Explain eapply behavior.
Date: Thu, 15 Oct 2015 12:50:10 +0200 [thread overview]
Message-ID: <1444906221-30505-12-git-send-email-ulm@gentoo.org> (raw)
In-Reply-To: <1444906221-30505-1-git-send-email-ulm@gentoo.org>
From: Michał Górny <mgorny@gentoo.org>
Bug: 463768
---
pkg-mgr-commands.tex | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index 7997323..8fb8059 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -148,14 +148,41 @@ These commands are used during the \t{src\_prepare} phase to apply patches to th
Ebuilds must not run any of these commands once the current phase function has returned.
\begin{description}
-\item[eapply] \featurelabel{eapply}
+\item[eapply] \featurelabel{eapply} Takes zero or more GNU patch options, followed by one or more
+ file or directory paths. Processes options and applies all patches found in specified locations
+ according to Algorithm~\ref{alg:eapply}. If applying the patches fails, it aborts the build
+ using \t{die}, unless run using \t{nonfatal}, in which case it returns non-zero exit status.
Only available in EAPIs listed in table~\ref{tab:patch-commands} as supporting \t{eapply}.
\end{description}
\begin{algorithm}
\caption{eapply logic} \label{alg:eapply}
\begin{algorithmic}[1]
-\STATE \COMMENT{WORK IN PROGRESS}
+\IF{any parameter is equal to \t{"-{}-"}}
+ \STATE collect all parameters before the first \t{"-{}-"} in the \t{options} array
+ \STATE collect all parameters after the first \t{"-{}-"} in the \t{files} array
+\ELSIF{any parameter that begins with a hyphen follows one that does not}
+ \STATE abort the build process with an error
+\ELSE
+ \STATE collect all parameters beginning with a hyphen in the \t{options} array
+ \STATE collect all remaining parameters in the \t{files} array
+\ENDIF
+
+\FORALL{\t{x} in the \t{files} array}
+ \IF{\t{\$x} is a directory}
+ \FORALL{files \t{f} matching \t{\$x/*.diff} or \t{\$x/*.patch}, sorted in POSIX locale}
+ \STATE call \t{patch -p1 -f -g0 -{}-no-backup-if-mismatch "\$\{options[@]\}" < "\$f"}
+ \IF{child process returned with non-zero exit status}
+ \STATE return immediately with an error
+ \ENDIF
+ \ENDFOR
+ \ELSE
+ \STATE call \t{patch -p1 -f -g0 -{}-no-backup-if-mismatch "\$\{options[@]\}" < "\$x"}
+ \IF{child process returned with non-zero exit status}
+ \STATE return immediately with an error
+ \ENDIF
+ \ENDIF
+\ENDFOR
\end{algorithmic}
\end{algorithm}
--
2.6.1
next prev parent reply other threads:[~2015-10-15 10:50 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 10:49 [gentoo-pms] EAPI 6 draft for review Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 01/22] Add an EAPI 6 identical to EAPI 5 Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 02/22] Rework the EAPI feature table Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 03/22] Reformat EAPI tables to be more compact Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 04/22] Delete redundant sentence in the list of defined EAPIs Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 05/22] EAPI 6 supports package.* and use.* directories Ulrich Müller
2015-11-05 18:38 ` David Leverton
2015-11-05 19:11 ` Ulrich Mueller
2015-11-05 22:14 ` Michał Górny
2015-11-05 22:25 ` Ulrich Mueller
2015-11-06 21:38 ` Michał Górny
2015-11-06 22:52 ` Ulrich Mueller
2015-11-05 22:07 ` Michał Górny
2015-11-06 21:32 ` David Leverton
2015-11-06 23:27 ` Ulrich Mueller
2015-11-07 0:08 ` Ulrich Mueller
2015-11-07 0:12 ` David Leverton
2015-11-07 0:58 ` Ulrich Mueller
2015-11-07 9:03 ` Michał Górny
2015-10-15 10:50 ` [gentoo-pms] [PATCH 06/22] EAPI 6: Bash version is 4.2 Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 07/22] EAPI 6 enables failglob in global scope Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 08/22] EAPI 6: einstall banned Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 09/22] EAPI 6: die and assert called with -n respect nonfatal Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 10/22] EAPI 6 has eapply Ulrich Müller
2015-10-15 10:50 ` Ulrich Müller [this message]
2015-10-16 10:08 ` [gentoo-pms] [PATCH 11/22] EAPI 6: Explain eapply behavior Michał Górny
2015-10-16 15:45 ` Ulrich Mueller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 12/22] EAPI 6 has eapply_user Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 13/22] EAPI 6 has a default src_prepare Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 14/22] EAPI 6: econf adds --docdir and --htmldir Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 15/22] EAPI 6 has in_iuse Ulrich Müller
2015-10-15 16:40 ` Ciaran McCreesh
2015-10-15 16:49 ` Ulrich Mueller
2015-10-15 16:56 ` Ciaran McCreesh
2015-10-15 17:05 ` Ulrich Mueller
2015-10-15 17:11 ` Ciaran McCreesh
2015-10-15 17:51 ` [gentoo-pms] [PATCH] Calling a USE list function in global scope is an error Ulrich Müller
2015-10-18 11:14 ` [gentoo-pms] " Ulrich Mueller
2015-10-15 18:34 ` [gentoo-pms] [PATCH 15/22] EAPI 6 has in_iuse Michał Górny
2015-10-15 18:33 ` Michał Górny
2015-10-15 10:50 ` [gentoo-pms] [PATCH 16/22] EAPI 6: unpack supports absolute and relative paths Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 17/22] EAPI 6: unpack supports txz Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 18/22] EAPI 6: unpack matches filename extensions case-insensitively Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 19/22] EAPI 6 has einstalldocs Ulrich Müller
2015-11-03 17:24 ` David Leverton
2015-11-03 17:53 ` Michał Górny
2015-11-03 19:51 ` Ulrich Mueller
2015-11-03 19:44 ` Ulrich Mueller
2015-11-03 20:36 ` Ulrich Mueller
2015-11-03 23:07 ` David Leverton
2015-10-15 10:50 ` [gentoo-pms] [PATCH 20/22] EAPI 6 has a different src_install implementation Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 21/22] EAPI 6 has get_libdir Ulrich Müller
2015-10-15 10:50 ` [gentoo-pms] [PATCH 22/22] Merge several EAPI feature tables Ulrich Müller
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=1444906221-30505-12-git-send-email-ulm@gentoo.org \
--to=ulm@gentoo.org \
--cc=gentoo-pms@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