From 536a3ecab85b344be6489dbd4fe510e25a917828 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 5 Nov 2016 11:56:19 +0000 Subject: [PATCH] cvs-adjustroot: properly exit nonzero in case of error. Fixes the first half of #839708. Signed-off-by: Ian Jackson --- debian/changelog | 2 ++ scripts/cvs-adjustroot | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 9228086..aa22904 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ chiark-utils (4.5.0~iwj5) unstable; urgency=medium * cgi-fcgi-interp: correct the copyright header rubric. * nntpid: install in /usr/bin. Closes:#773651. * rebuild on current sid: Closes:#811216. + * cvs-adjustroot: properly exit nonzero in case of error. + Fixes the first half of #839708. -- diff --git a/scripts/cvs-adjustroot b/scripts/cvs-adjustroot index 0e128cc..081859f 100755 --- a/scripts/cvs-adjustroot +++ b/scripts/cvs-adjustroot @@ -41,4 +41,12 @@ if $reinvoke; then exit 0 fi -find -path '*/CVS/Root' -exec cvs-adjustroot --reinvoke "$old" "$new" '{}' ';' +# GNU find provides + exec variants which set exit status and pass +# multiple arguments, or \; variants which pass one argument but do +# not set exit status. So use a separate -exec false + to arrange for +# nonzero exit status when appropriate. + +find -path '*/CVS/Root' \ + \( -exec cvs-adjustroot --reinvoke "$old" "$new" '{}' ';' \ + -o -exec false '{}' + \ + \) -- 2.30.2