From: Kevin M. Rosenberg Date: Mon, 13 May 2002 00:57:42 +0000 (+0000) Subject: r1996: logical pathname fixes X-Git-Tag: v3.8.6~1114 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=41718190385a3efe7ea5be04d059391ae3a86141 r1996: logical pathname fixes --- diff --git a/clsql.system b/clsql.system index f8143c1..976ca20 100644 --- a/clsql.system +++ b/clsql.system @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: clsql.system,v 1.9 2002/05/13 00:45:10 kevin Exp $ +;;;; $Id: clsql.system,v 1.10 2002/05/13 00:57:42 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -19,11 +19,8 @@ (declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0))) (in-package :cl-user) -(handler-case - (logical-pathname-translations "CL-LIBRARY") - (error () - (load (make-pathname :name "set-cl-library" :type "cl" - :defaults *load-truename*)))) +(load (make-pathname :name "set-cl-library" :type "cl" + :defaults *load-truename*)) ;;; System definitions diff --git a/set-cl-library.cl b/set-cl-library.cl index 51aa42e..fc9e6fc 100644 --- a/set-cl-library.cl +++ b/set-cl-library.cl @@ -20,12 +20,26 @@ (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)) + (error + (format nil "~S does not equal ~S" + dir (pathname-directory logical-dir))))))) + + + ))