X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fasdf-install%2Finstaller.lisp;h=5d76644a168e5f5f1a25a8b17ec2388f74192dd3;hb=f7ed0a1e83f34b447e621d22b6010f78171bd8ad;hp=4dd97a5ad32541c89ba742a5848ebc681347e47b;hpb=18aa51db1d51cb20eb35a8e34c36cd78446c6bdd;p=sbcl.git diff --git a/contrib/asdf-install/installer.lisp b/contrib/asdf-install/installer.lisp index 4dd97a5..5d76644 100644 --- a/contrib/asdf-install/installer.lisp +++ b/contrib/asdf-install/installer.lisp @@ -2,8 +2,9 @@ (defvar *proxy* (posix-getenv "http_proxy")) (defvar *cclan-mirror* - (or (posix-getenv "CCLAN_MIRROR") - "http://ftp.linux.org.uk/pub/lisp/cclan/")) + (let ((mirror (posix-getenv "CCLAN_MIRROR"))) + (or (and (not (string= mirror "")) mirror) + "http://ftp.linux.org.uk/pub/lisp/cclan/"))) (defun directorify (name) ;; input name may or may not have a training #\/, but we know we @@ -13,7 +14,8 @@ (merge-pathnames (make-pathname :directory `(:relative ,(pathname-name path))) (make-pathname :directory (pathname-directory path) - :host (pathname-host path))) + :host (pathname-host path) + :device (pathname-device path))) path))) (defvar *sbcl-home* (directorify (posix-getenv "SBCL_HOME"))) @@ -31,11 +33,13 @@ ,(merge-pathnames "systems/" *dot-sbcl*) "Personal installation"))) -(let* ((*package* (find-package :asdf-install-customize)) - (file (probe-file (merge-pathnames - (make-pathname :name ".asdf-install") - (user-homedir-pathname))))) - (when file (load file))) +(unless (sb-ext:posix-getenv "SBCL_BUILDING_CONTRIB") + ;; Not during build, thanks. + (let* ((*package* (find-package :asdf-install-customize)) + (file (probe-file (merge-pathnames + (make-pathname :name ".asdf-install") + (user-homedir-pathname))))) + (when file (load file)))) (define-condition download-error (error) ((url :initarg :url :reader download-url) @@ -136,7 +140,7 @@ (defun copy-stream (in out) - (let ((buf (make-array 8192 :element-type (stream-element-type in)))) + (let ((buf (make-array 8192 :element-type (stream-element-type out)))) (loop for pos = (read-sequence buf in) until (zerop pos) do (write-sequence buf out :end pos)))) @@ -196,7 +200,7 @@ (loop for l = (read-line (process-output proc) nil nil) while l when (> (mismatch l "[GNUPG:]") 6) - do (destructuring-bind (_ tag &rest data) (asdf::split l) + do (destructuring-bind (_ tag &rest data) (asdf::split-string l) (declare (ignore _)) (pushnew (cons (intern tag :keyword) data) tags))) @@ -255,9 +259,14 @@ (elt *locations* (1- response))))) (defparameter *tar-program* - #+darwin "gnutar" - #+sunos "gtar" - #-(or darwin sunos) "tar") + ;; Please do not "clean this up" by using a bunch of #+'s and one + ;; #-. When the conditional is written this way, adding a new + ;; special case only involves one change. If #- is used, two changes + ;; are needed. -- JES, 2007-02-12 + (progn + "tar" + #+darwin "gnutar" + #+(or sunos netbsd) "gtar")) (defun get-tar-directory (packagename) (let* ((tar (with-output-to-string (o)