1 |
On 02/22/2017 11:10 AM, Fabian Groffen wrote: |
2 |
> Don't try to use an interactive editor to obtain the difference between |
3 |
> files. Fall back to plain `diff -q` in this case. |
4 |
> --- |
5 |
> bin/etc-update | 19 +++++++++++++++---- |
6 |
> 1 file changed, 15 insertions(+), 4 deletions(-) |
7 |
> |
8 |
> diff --git a/bin/etc-update b/bin/etc-update |
9 |
> index e0f7224dc..ea69f1478 100755 |
10 |
> --- a/bin/etc-update |
11 |
> +++ b/bin/etc-update |
12 |
> @@ -649,10 +649,21 @@ do_distconf() { |
13 |
> elif [[ -L ${efile} || -L ${file} ]] ; then |
14 |
> # not the same file types |
15 |
> continue |
16 |
> - elif diff_command "${file}" "${efile}" &> /dev/null; then |
17 |
> - # replace identical copy |
18 |
> - mv "${file}" "${efile}" |
19 |
> - break |
20 |
> + else |
21 |
> + local ret= |
22 |
> + if [[ ${using_editor} == 0 ]] ; then |
23 |
> + diff_command "${file}" "${efile}" &> /dev/null |
24 |
> + ret=$? |
25 |
> + else |
26 |
> + # fall back to plain diff |
27 |
> + diff -q "${file}" "${efile}" &> /dev/null |
28 |
> + ret=$? |
29 |
> + fi |
30 |
> + if [[ ${ret} == 0 ]] ; then |
31 |
> + # replace identical copy |
32 |
> + mv "${file}" "${efile}" |
33 |
> + break |
34 |
> + fi |
35 |
> fi |
36 |
> done |
37 |
> } |
38 |
> |
39 |
|
40 |
Looks good. Merged: |
41 |
|
42 |
https://gitweb.gentoo.org/proj/portage.git/commit/?id=246373bbe52c55e912381d8555cceb70db0ec41b |
43 |
-- |
44 |
Thanks, |
45 |
Zac |