quicklisp-abcl: robustify loading

This patch robustifies the process followed by invoking ABCL as:

    abcl --eval "(require :abcl-contrib" --eval "(require :quicklisp-abcl)"

will get ABCL running with an active Quicklisp, downloading components
as necessary.


Try ng to produce and use compiled artifact for
<file:~/quicklisp/setup.lisp> if possible between invocations of the
implementation.
parent 963920d7
...@@ -9,27 +9,35 @@ ...@@ -9,27 +9,35 @@
(defsystem :quicklisp-abcl (defsystem :quicklisp-abcl
:description :description
"Load Quicklisp from the network if it isn't already installed. <urn:abcl.org/release/1.3.0/contrib/quicklisp-abcl#0.2.0>" "Load Quicklisp from the network if it isn't already installed. <urn:abcl.org/release/1.3.0/contrib/quicklisp-abcl#0.3.0>"
:version "0.2.0" :version "0.3.0"
:components nil) :components nil)
;; #+nil::needs-abcl-asdf((:iri "http://beta.quicklisp.org/quicklisp.lisp")) ;; #+nil::needs-abcl-asdf((:iri "http://beta.quicklisp.org/quicklisp.lisp"))
;; #+nil::in-order-to ((asdf:compile-op (ql::install))) ;;; FIXME tickle the internal Quicklisp setup
(defmethod perform ((o load-op) (c (eql (find-system 'quicklisp-abcl)))) (defmethod perform ((o load-op) (c (eql (find-system 'quicklisp-abcl))))
;;; Load local Quicklisp if it has been an installed (let* ((setup (merge-pathnames "quicklisp/setup.abcl"
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))
(user-homedir-pathname)))) (setup-source (merge-pathnames (make-pathname :type "lisp") setup)))
(if (probe-file quicklisp-init) (let ((it (or (probe-file setup)
(load quicklisp-init) (probe-file setup-source))))
(handler-case (if it
(load "https://beta.quicklisp.org/quicklisp.lisp") ;;; First try loaded Quicklisp artifacts if it has been an installed for this user
(error (e) (prog1
(warn "Using insecure transport for remote installation (load it)
of Quicklisp:~&~A~&." e) ;; compilation only succeeds after QUICKLISP has been loaded fully
(load "http://beta.quicklisp.org/quicklisp.lisp")))) (unless (probe-file setup)
(unless (find-package :quicklisp) (compile-file setup-source)))
(funcall (intern "INSTALL" "QUICKLISP-QUICKSTART"))))) (progn
(handler-case
(load "https://beta.quicklisp.org/quicklisp.lisp")
(error (e)
(warn "Using insecure transport for remote installation of Quicklisp:~&~A~&." e)
(load "http://beta.quicklisp.org/quicklisp.lisp")))
(unless (find-package :quicklisp)
(funcall (intern "INSTALL" "QUICKLISP-QUICKSTART"))))))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment