1 |
>>>>> On Thu, 29 Oct 2015, Michał Górny wrote: |
2 |
|
3 |
> Dnia 29 października 2015 09:28:53 CET, Ulrich Mueller <ulm@g.o> napisał(a): |
4 |
>> Patch v2, with logic inverted: |
5 |
>> 0 = sources are unmodified |
6 |
>> 1 = patches applied successfully |
7 |
>> 2 = failure |
8 |
>> |
9 |
>> Rationale: The relevant information is if sources are unmodified or |
10 |
>> (potentially) modified, so these two states should correspond to shell |
11 |
>> true and false, respectively. |
12 |
>> |
13 |
>> Also seems natural to return 0 in the most common case that there are |
14 |
>> no user patches, and in the case that eapply_user() is a no-op. |
15 |
|
16 |
> Nah, that's going to be confusing. |
17 |
|
18 |
Why? We have two successful states, so obviously (at least) one of |
19 |
them must return shell false. I don't see why one would prefer the |
20 |
"user modified" case over the "unmodified" case. |
21 |
|
22 |
> if ! eapply_user; then |
23 |
> # patches were applied...?! |
24 |
|
25 |
So? |
26 |
|
27 |
> I'd go for: |
28 |
|
29 |
> 0 - applied |
30 |
> 1 - no patches |
31 |
> and die on failure |
32 |
|
33 |
No, that would be inconsistent with behaviour of all other commands |
34 |
under nonfatal. |
35 |
|
36 |
Ulrich |