asdf in sbcl saved images.

Pascal Bourguignon <[email protected]>
Newsgroups gmane.lisp.cclan.general
Organization InformatiMago.
Message-ID <[email protected]>
It appears that when running an executable saved sbcl image,
SBCL_HOME is not set.  Therefore,  (sb-ext:posix-getenv "SBCL_HOME")
returns NIL, which is not accepted by truename:


  (defun contrib-sysdef-search (system)
    (let* ((name (coerce-name system))
           (home (truename (sb-ext:posix-getenv "SBCL_HOME")))
           (contrib (merge-pathnames
                     (make-pathname :directory `(:relative ,name)
                                    :name name
                                    :type "asd"
                                    :case :local
                                    :version :newest)
                     home)))
      (probe-file contrib)))

  (pushnew
   '(merge-pathnames "site-systems/"
     (truename (sb-ext:posix-getenv "SBCL_HOME")))
   *central-registry*)



Perhaps we could use:

(defun contrib-sysdef-search (system)
  (let ((sbcl-home (sb-ext:posix-getenv "SBCL_HOME")))
    (when sbcl-home
      (let* ((name (coerce-name system))
             (home (truename sbcl-home))
             (contrib (merge-pathnames
                       (make-pathname :directory `(:relative ,name)
                                      :name name
                                      :type "asd"
                                      :case :local
                                      :version :newest)
                       home)))
        (probe-file contrib)))))

(let ((sbcl-home  (sb-ext:posix-getenv "SBCL_HOME")))
  (when sbcl-home
    (pushnew
     '(merge-pathnames "site-systems/"
       (truename (sb-ext:posix-getenv "SBCL_HOME")))
     *central-registry*)))




-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Grace personified,
I leap into the window.
I meant to do that.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.