Changeset 12878


Ignore:
Timestamp:
08/08/10 20:41:08 (13 years ago)
Author:
Mark Evenson
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/asdf-install/installer.lisp

    r12657 r12878  
    152152  (concatenate 'string url ".asc"))
    153153
     154;;; XXX unsightful hack
     155(defvar *dont-check-signature* nil)
     156
    154157(defun download-files-for-package (package-name-or-url)
     158  (setf *dont-check-signature* nil)
    155159  (multiple-value-bind (package-url package-file)
    156160      (download-url-to-temporary-file
    157161       (download-link-for-package package-name-or-url))
    158162    (if (verify-gpg-signatures-p package-name-or-url)
    159   (multiple-value-bind (signature-url signature-file)
    160       (download-url-to-temporary-file
    161        (download-link-for-signature package-url))
    162     (declare (ignore signature-url))
    163     (values package-file signature-file))
     163        (restart-case
     164            (multiple-value-bind (signature-url signature-file)
     165                (download-url-to-temporary-file
     166                 (download-link-for-signature package-url))
     167              (declare (ignore signature-url))
     168              (values package-file signature-file))
     169          (skip-gpg-check ()
     170            :report "Don't check GPG signature for this package"
     171            (progn
     172              (setf *dont-check-signature* t)
     173              (values package-file nil))))
    164174  (values package-file nil))))
    165175 
    166176(defun verify-gpg-signature (file-name signature-name)
    167177  (block verify
     178    (when (and (null signature-name) *dont-check-signature*)
     179      (return-from verify t))
    168180    (loop
    169181      (restart-case
Note: See TracChangeset for help on using the changeset viewer.