Re: bug #23953 ae: postinst does not check for errors
James Troup <james@nocrew.org> writes:
> It is however reason to tell dpkg that something went wrong with
> configuring ae. ... the postinst did not succeeded and should not
> pretend it did.
Perhaps something like this would be appropriate:
#! /bin/sh
set -e
exit_code=0
set +e
update-alternatives --install /usr/bin/editor editor /bin/ae 20 \
--slave /usr/man/man1/editor.1.gz editor.1.gz /usr/man/man1/ae.1.gz
exit_code=$?
set -e
if [ -e /etc/ae2vi.rc ] ; then
rm -f /etc/ae2vi.rc
fi
exit $exit_code
This lets the postinst finish even if update-alternatives fails, but
it also notifies dpkg of the problem.
--
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930
--
To UNSUBSCRIBE, email to debian-policy-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: