X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=set-cl-library.cl;h=1d18e5ef4de9141122f66bb764bac12ca56ea10f;hb=03b7dcc2983e9e0cd2a510a449f3f4567ca9e0d5;hp=51aa42ef5624e2647b9b0750a4bd405e584e1a54;hpb=a64de0e661a3fa56b572320c2c68abb0c658f2b2;p=clsql.git diff --git a/set-cl-library.cl b/set-cl-library.cl index 51aa42e..1d18e5e 100644 --- a/set-cl-library.cl +++ b/set-cl-library.cl @@ -20,12 +20,24 @@ (handler-case (logical-pathname-translations "CL-LIBRARY") (error () - (let* ((dir (pathname-directory *load-truename*)) - (parent-dir (subseq dir 0 (1- (length dir))))) - (load (make-pathname :name "set-logical" :type "cl" - :defaults *load-truename*)) - (set-logical-host-for-pathname - "CL-LIBRARY" - (make-pathname :host (pathname-host *load-truename*) - :device (pathname-device *load-truename*) - :directory parent-dir))))) + (let* ((dir (pathname-directory *load-truename*)) + (parent-dir (subseq dir 0 (1- (length dir))))) + (load (make-pathname :name "set-logical" :type "cl" + :defaults *load-truename*)) + (set-logical-host-for-pathname + "CL-LIBRARY" + (make-pathname :host (pathname-host *load-truename*) + :device (pathname-device *load-truename*) + :directory parent-dir)))) + (:no-error (translation) + ;; Make sure that CL-LIBRARY points to this installation + (let* ((dir (pathname-directory *load-truename*)) + (base-dir (car (last dir))) + (logical-dir (translate-logical-pathname + (concatenate 'string + "CL-LIBRARY:" base-dir ";")))) + (unless (equalp dir (pathname-directory logical-dir)) + (let ((*print-circle* nil)) + (error "CL-LIBRARY:~A; directory ~S does not equal *load-truename*'s directory ~S" + base-dir (cdr dir) + (cdr (pathname-directory logical-dir))))))))