commit:     c8afd4a44f0bae300ef21e5873ed0c984d8e2240
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 16 15:54:53 2015 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 18 11:22:34 2015 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=c8afd4a4

EAPI 6: Fix eapply algorithm.

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

diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index 22623a7..1e7b8cf 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -173,19 +173,25 @@ Ebuilds must not run any of these commands once the 
current phase function has r
     \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}
-                \STATE return immediately with an error
+                \STATE return immediately with that error 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}
-            \STATE return immediately with an error
+            \STATE return immediately with that error status
         \ENDIF
     \ENDIF
 \ENDFOR

Reply via email to