diff options
author | Manoj Srivastava <srivasta@debian.org> | 2008-04-03 03:09:01 +0000 |
---|---|---|
committer | Manoj Srivastava <srivasta@debian.org> | 2008-04-03 03:09:01 +0000 |
commit | 65914fc5ee000dfd94f01f43a67258bf5a9451e2 (patch) | |
tree | 5e0c831aa3fa772db0963a154aa7504bbab59a00 /ucf | |
parent | 57258de1063482c29cf200f79e71c796cb09644d (diff) |
fails to catch conflicts on three-way merging
When three-way merging has a conflict and diff3 exits with a non-zero
status, the postinst exits immediately as "set -e" is in effect.
The attached trivial patch fixes this so that the conflict error message
gets printed instead. Thanks to Niko Tyni.
git-archimport-id: srivasta@debian.org--lenny/ucf--devel--3.0--patch-5
Diffstat (limited to 'ucf')
-rwxr-xr-x | ucf | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -927,10 +927,11 @@ EOPEND echo >&2 "Merging changes into the new version" if [ -e "$statedir/cache/$cached_file" \ -a "X$THREEWAY" != "X" ]; then + ret=0 diff3 -L Current -L Older -L New -m \ "$dest_file" "$statedir/cache/$cached_file" \ - "$new_file" > $dest_file.${NEW_SUFFIX} - case "$?" in + "$new_file" > $dest_file.${NEW_SUFFIX} || ret=$? + case "$ret" in 0) new_file="$dest_file.${NEW_SUFFIX}" RETAIN_OLD=YES |