Improve exit statuses and error messages in pacman-key
commitc231c9af9712e95e58f660d46bd8feaf6fd891e2
authorcanyonknight <canyonknight@gmail.com>
Tue, 17 Jan 2012 00:12:41 +0000 (16 19:12 -0500)
committerDan McGee <dan@archlinux.org>
Thu, 19 Jan 2012 04:01:12 +0000 (18 22:01 -0600)
tree78aee24bf33a856e5602dabd894cde54a9aa120e
parent24ca6ce1f969a6f5d3ef9277f6d20efcd76330ec
Improve exit statuses and error messages in pacman-key

Return codes from gpg commands are currently lost. This adds the functionality
of taking non-zero exit statuses from gpg. This includes error reporting for all
gpg commands that are run individually, run in a loop, and run through a pipe.

Includes the check_keyids_exist function which verifies a key exists locally
prior to attempted local manipulation of the key.

If a gpg command has a non-zero status, pacman-key will now exit with a non-zero
status. It will print a gettext error message of gpg's failure.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
scripts/pacman-key.sh.in