Changeset 14888


Ignore:
Timestamp:
10/06/16 11:45:58 (13 months ago)
Author:
mevenson
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd

    r14615 r14888  
    1010(defsystem :quicklisp-abcl
    1111    :description
    12     "Load Quicklisp from the network if it isn't already installed. <urn:abcl.org/release/1.3.0/contrib/quicklisp-abcl#0.2.0>"
    13     :version "0.2.0"
     12    "Load Quicklisp from the network if it isn't already installed. <urn:abcl.org/release/1.3.0/contrib/quicklisp-abcl#0.3.0>"
     13    :version "0.3.0"
    1414    :components nil)
    1515
    1616;; #+nil::needs-abcl-asdf((:iri "http://beta.quicklisp.org/quicklisp.lisp"))
    17 ;;    #+nil::in-order-to ((asdf:compile-op (ql::install)))  ;;; FIXME tickle the internal Quicklisp setup
    1817
    1918(defmethod perform ((o load-op) (c (eql (find-system 'quicklisp-abcl))))
    20   ;;; Load local Quicklisp if it has been an installed
    21   (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
    22                                          (user-homedir-pathname))))
    23     (if (probe-file quicklisp-init)
    24         (load quicklisp-init)
    25         (handler-case
    26             (load "https://beta.quicklisp.org/quicklisp.lisp")
    27           (error (e)
    28             (warn "Using insecure transport for remote installation
    29               of Quicklisp:~&~A~&." e)
    30             (load "http://beta.quicklisp.org/quicklisp.lisp"))))
    31     (unless (find-package :quicklisp)
    32       (funcall (intern "INSTALL" "QUICKLISP-QUICKSTART")))))
     19  (let* ((setup (merge-pathnames "quicklisp/setup.abcl"
     20                                 (user-homedir-pathname)))
     21         (setup-source (merge-pathnames (make-pathname :type "lisp") setup)))
     22    (let ((it (or (probe-file setup)
     23                  (probe-file setup-source))))
     24      (if it
     25           ;;; First try loaded Quicklisp artifacts if it has been an installed for this user
     26          (prog1
     27              (load it)
     28            ;; compilation only succeeds after QUICKLISP has been loaded fully
     29            (unless (probe-file setup)
     30              (compile-file setup-source)))
     31          (progn
     32            (handler-case
     33                (load "https://beta.quicklisp.org/quicklisp.lisp")
     34              (error (e)
     35                (warn "Using insecure transport for remote installation of Quicklisp:~&~A~&." e)
     36                (load "http://beta.quicklisp.org/quicklisp.lisp")))
     37            (unless (find-package :quicklisp)
     38              (funcall (intern "INSTALL" "QUICKLISP-QUICKSTART"))))))))
     39
     40
    3341
    3442       
Note: See TracChangeset for help on using the changeset viewer.