[armedbear-cvs] r12878 - trunk/abcl/contrib/asdf-install
Mark Evenson
mevenson at common-lisp.net
Sun Aug 8 20:41:10 UTC 2010
Author: mevenson
Date: Sun Aug 8 16:41:08 2010
New Revision: 12878
Log:
Interactive restart to skip missing GPG signature.
A pretty awful hack using a DEFVAR form to communicate state from an
interactive restart makes it seem like I didn't get the memo about how
to use the Lisp condition system properly. Mea culpa! But it looks
like the code from how SBCL handles this would be a better place to go
then what we have currently.
Modified:
trunk/abcl/contrib/asdf-install/installer.lisp
Modified: trunk/abcl/contrib/asdf-install/installer.lisp
==============================================================================
--- trunk/abcl/contrib/asdf-install/installer.lisp (original)
+++ trunk/abcl/contrib/asdf-install/installer.lisp Sun Aug 8 16:41:08 2010
@@ -151,20 +151,32 @@
(defun download-link-for-signature (url)
(concatenate 'string url ".asc"))
+;;; XXX unsightful hack
+(defvar *dont-check-signature* nil)
+
(defun download-files-for-package (package-name-or-url)
+ (setf *dont-check-signature* nil)
(multiple-value-bind (package-url package-file)
(download-url-to-temporary-file
(download-link-for-package package-name-or-url))
(if (verify-gpg-signatures-p package-name-or-url)
- (multiple-value-bind (signature-url signature-file)
- (download-url-to-temporary-file
- (download-link-for-signature package-url))
- (declare (ignore signature-url))
- (values package-file signature-file))
+ (restart-case
+ (multiple-value-bind (signature-url signature-file)
+ (download-url-to-temporary-file
+ (download-link-for-signature package-url))
+ (declare (ignore signature-url))
+ (values package-file signature-file))
+ (skip-gpg-check ()
+ :report "Don't check GPG signature for this package"
+ (progn
+ (setf *dont-check-signature* t)
+ (values package-file nil))))
(values package-file nil))))
(defun verify-gpg-signature (file-name signature-name)
(block verify
+ (when (and (null signature-name) *dont-check-signature*)
+ (return-from verify t))
(loop
(restart-case
(let ((tags (gpg-results file-name signature-name)))
More information about the armedbear-cvs
mailing list