1 |
>>>>> On Wed, 28 Oct 2015, Ulrich Mueller wrote: |
2 |
|
3 |
> It is late in the EAPI 6 process, but I believe that the patch below |
4 |
> is a good change. We should specify a return status for eapply_user. |
5 |
|
6 |
Patch v2, with logic inverted: |
7 |
0 = sources are unmodified |
8 |
1 = patches applied successfully |
9 |
2 = failure |
10 |
|
11 |
Rationale: The relevant information is if sources are unmodified or |
12 |
(potentially) modified, so these two states should correspond to shell |
13 |
true and false, respectively. |
14 |
|
15 |
Also seems natural to return 0 in the most common case that there are |
16 |
no user patches, and in the case that eapply_user() is a no-op. |
17 |
|
18 |
> Please review. |
19 |
|
20 |
Ulrich |
21 |
|
22 |
|
23 |
From ae6782cc84e18c8c39c2583731ffed0e258db209 Mon Sep 17 00:00:00 2001 |
24 |
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@g.o> |
25 |
Date: Thu, 29 Oct 2015 08:10:42 +0100 |
26 |
Subject: [PATCH] EAPI 6: Specify return status for eapply_user. |
27 |
|
28 |
Suggested by dilfridge. |
29 |
--- |
30 |
pkg-mgr-commands.tex | 6 ++++-- |
31 |
1 file changed, 4 insertions(+), 2 deletions(-) |
32 |
|
33 |
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex |
34 |
index 51f6ebf..0668686 100644 |
35 |
--- a/pkg-mgr-commands.tex |
36 |
+++ b/pkg-mgr-commands.tex |
37 |
@@ -157,10 +157,12 @@ Ebuilds must not run any of these commands once the current phase function has r |
38 |
\item[eapply\_user] \featurelabel{eapply-user} Takes no arguments. Package managers supporting it |
39 |
apply user-provided patches to the source tree in the current working directory. Exact behaviour |
40 |
is implementation defined and beyond the scope of this specification. Package managers not |
41 |
- supporting it must implement the command as a no-op. Only available in EAPIs listed in |
42 |
+ supporting it must implement the command as a no-op. Returns 0 if the sources are unmodified, |
43 |
+ or 1 if patches applied successfully. On failure, returns 2 when called using \t{nonfatal}, |
44 |
+ otherwise aborts the build process. Only available in EAPIs listed in |
45 |
table~\ref{tab:patch-commands} as supporting \t{eapply\_user}. In EAPIs where it is supported, |
46 |
\t{eapply\_user} must be called once in the \t{src\_prepare} phase; for any subsequent calls |
47 |
- the command will do nothing. |
48 |
+ the command will do nothing, and it will return the same status as for the first call. |
49 |
\end{description} |
50 |
|
51 |
\begin{algorithm} |
52 |
-- |
53 |
2.6.2 |