summaryrefslogtreecommitdiff
path: root/ucf
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2008-04-03 03:09:01 +0000
committerManoj Srivastava <srivasta@debian.org>2008-04-03 03:09:01 +0000
commit65914fc5ee000dfd94f01f43a67258bf5a9451e2 (patch)
tree5e0c831aa3fa772db0963a154aa7504bbab59a00 /ucf
parent57258de1063482c29cf200f79e71c796cb09644d (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-xucf5
1 files changed, 3 insertions, 2 deletions
diff --git a/ucf b/ucf
index c797911..22ffb7d 100755
--- a/ucf
+++ b/ucf
@@ -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