public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pms:eapi-6 commit in: /
Date: Sun,  8 Nov 2015 19:36:52 +0000 (UTC)	[thread overview]
Message-ID: <1447010960.a8196cb8791b2eba41e27e9adae2c591fcefa04c.ulm@gentoo> (raw)

commit:     a8196cb8791b2eba41e27e9adae2c591fcefa04c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 14 16:44:02 2015 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Nov  8 19:29:20 2015 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=a8196cb8

EAPI 6: Explain eapply behavior.

Bug: 463768

 pkg-mgr-commands.tex | 37 +++++++++++++++++++++++++++++++++++--
 1 file changed, 35 insertions(+), 2 deletions(-)

diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index 28a96b0..89c00ff 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -148,14 +148,47 @@ 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
+\IF{the \t{files} array is empty}
+    \STATE abort the build process with an error
+\ENDIF
+\FORALL{\t{x} in the \t{files} array}
+    \IF{\t{\$x} is a directory}
+        \IF{\NOT any files match \t{\$x/*.diff} or \t{\$x/*.patch}}
+            \STATE abort the build process with an error
+        \ENDIF
+        \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}
+                \RETURN immediately with that status
+            \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}
+            \RETURN immediately with that status
+        \ENDIF
+    \ENDIF
+\ENDFOR
+\RETURN shell true (0)
 \end{algorithmic}
 \end{algorithm}
 


             reply	other threads:[~2015-11-08 19:37 UTC|newest]

Thread overview: 211+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-08 19:36 Ulrich Müller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-11-13 20:19 [gentoo-commits] proj/pms:eapi-6 commit in: / Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-08 19:36 Ulrich Müller
2015-11-06  8:12 Ulrich Müller
2015-11-05 16:08 Ulrich Müller
2015-11-05 16:08 Ulrich Müller
2015-11-04  6:08 Ulrich Müller
2015-11-03  8:03 Ulrich Müller
2015-10-30 16:01 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-23 17:30 Ulrich Müller
2015-10-21 17:13 Ulrich Müller
2015-10-20  7:19 Ulrich Müller
2015-10-19 16:39 Ulrich Müller
2015-10-19  8:44 Ulrich Müller
2015-10-18 20:16 Ulrich Müller
2015-10-18 11:24 Ulrich Müller
2015-10-18 11:24 Ulrich Müller
2015-10-18 11:24 Ulrich Müller
2015-10-18 11:24 Ulrich Müller
2015-10-18 11:24 Ulrich Müller
2015-10-18 11:24 Ulrich Müller
2015-10-18 11:24 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15 10:43 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-15  6:23 Ulrich Müller
2015-10-14 20:52 Michał Górny
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 19:03 Ulrich Müller
2015-08-30 18:55 [gentoo-commits] proj/pms:master " Ulrich Müller
2015-08-30 19:03 ` [gentoo-commits] proj/pms:eapi-6 " Ulrich Müller
2015-04-13 22:34 [gentoo-commits] proj/pms:master " Ulrich Müller
2015-08-30 19:03 ` [gentoo-commits] proj/pms:eapi-6 " Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-04-02 16:10 Ulrich Müller
2015-03-28 19:29 [gentoo-commits] proj/pms:master " Ulrich Müller
2015-04-02 16:10 ` [gentoo-commits] proj/pms:eapi-6 " Ulrich Müller
2015-03-28 19:29 [gentoo-commits] proj/pms:master " Ulrich Müller
2015-04-02 16:10 ` [gentoo-commits] proj/pms:eapi-6 " Ulrich Müller
2015-03-16  9:11 [gentoo-commits] proj/pms:master " Ulrich Müller
2015-04-02 16:10 ` [gentoo-commits] proj/pms:eapi-6 " Ulrich Müller
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 git@oystercatcher mirror+tproxy
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-03-03  6:18 Ulrich Müller
2015-02-21 12:19 [gentoo-commits] proj/pms:master " Ulrich Müller
2015-03-03  6:18 ` [gentoo-commits] proj/pms:eapi-6 " Ulrich Müller
2015-02-16 20:07 Ulrich Müller
2015-02-16 19:44 Ulrich Müller
2015-02-16 19:44 Ulrich Müller
2015-02-16 18:59 Ulrich Müller
2015-02-16 16:43 Ulrich Müller
2015-02-16 16:43 Ulrich Müller
2015-02-16 16:43 Ulrich Müller
2015-02-16 15:08 Ulrich Müller
2015-02-16 15:08 Ulrich Müller
2015-02-16 15:08 Ulrich Müller
2015-02-16 15:08 Ulrich Müller
2015-02-16 14:36 Ulrich Müller
2015-02-16 13:06 Ulrich Müller
2015-02-16 12:43 Ulrich Müller
2015-02-16 12:43 Ulrich Müller
2015-02-16 11:16 Ulrich Müller
2015-02-16 10:39 Ulrich Müller
2015-02-16 10:39 Ulrich Müller
2015-02-16 10:39 Ulrich Müller
2015-01-01 20:10 Ulrich Müller
2015-01-01 20:10 Ulrich Müller
2015-01-01 20:10 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=1447010960.a8196cb8791b2eba41e27e9adae2c591fcefa04c.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-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