gnupdate: Fix auto-downloading of GPG keys.

* maintainers/scripts/gnu/gnupdate (gnupg-verify): Always return STATUS.

svn path=/nixpkgs/trunk/; revision=30108
This commit is contained in:
Ludovic Courtès 2011-10-30 00:00:16 +00:00
parent 2492fba29f
commit 354b1a12c1

View file

@ -414,8 +414,7 @@ replaced by the result of their application to DERIVATIONS, a vhash."
(define %openpgp-key-server "keys.gnupg.net")
(define (gnupg-verify sig file)
"Verify signature SIG for FILE. Return a status s-exp or #f if GnuPG
failed."
"Verify signature SIG for FILE. Return a status s-exp if GnuPG failed."
(define (status-line->sexp line)
;; See file `doc/DETAILS' in GnuPG.
@ -480,9 +479,10 @@ failed."
(let* ((pipe (open-pipe* OPEN_READ %gpg-command "--status-fd=1"
"--verify" sig file))
(status (parse-status pipe)))
(if (pipe-failed? pipe)
#f
status)))
;; Ignore PIPE's exit status since STATUS above should contain all the
;; info we need.
(close-pipe pipe)
status))
(define (gnupg-status-good-signature? status)
"If STATUS, as returned by `gnupg-verify', denotes a good signature, return