[ca-certificates-java] 53/58: postinst: Use exit trap to not fail silently
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Wed May 31 13:13:19 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository ca-certificates-java.
commit 82a9309bed900dfabea10d8d5d36fce1b2147d04
Author: Benjamin Drung <bdrung at debian.org>
Date: Mon Nov 7 12:35:38 2016 +0000
postinst: Use exit trap to not fail silently
first_install() is called inside an if condition and thus 'set -e' does
not cause the script to exit on failure. Replace the if condition by an
exit trap to not ignore failures (e.g. when the jvm is not found).
Closes: #822201
---
debian/postinst.in | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/debian/postinst.in b/debian/postinst.in
index c2a2272..213b54c 100644
--- a/debian/postinst.in
+++ b/debian/postinst.in
@@ -103,12 +103,8 @@ case "$1" in
printf -- "-server KNOWN\n" > $temp_jvm_cfg
fi
- if first_install; then
- do_cleanup
- else
- do_cleanup
- exit 1
- fi
+ trap do_cleanup EXIT
+ first_install
fi
chmod 600 /etc/default/cacerts || true
;;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/ca-certificates-java.git
More information about the pkg-java-commits
mailing list