Changeset 13704


Ignore:
Timestamp:
12/18/11 21:08:13 (10 years ago)
Author:
Mark Evenson
Message:

Fix #181: TRUENAME doesn't always canonicalize the outer DEVICE component of JAR-PATHNAME.

If *DEFAULT-PATHNAME-DEFAULTS* is a JAR-PATHNAME, then TRUENAME will
not attempt to canonicalize the outer DEVICE component of a JAR-PATHNAME.

Remove corresponding kludge from ASDF.

Location:
trunk/abcl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Pathname.java

    r13700 r13704  
    21802180            Cons jars = (Cons) pathname.device;
    21812181            LispObject o = jars.car();
    2182             if (o instanceof Pathname && ! (((Pathname)o).isURL())) {
     2182            if (o instanceof Pathname
     2183                && !(((Pathname)o).isURL())
     2184                // XXX Silently fail to call truename() if the default
     2185                // pathname defaults exist within a jar, as that will
     2186                // (probably) not succeed.  The better solution would
     2187                // probably be to parametize the value of
     2188                // *DEFAULT-PATHNAME-DEFAULTS* on invocations of
     2189                // truename().
     2190                && !coerceToPathname(Symbol.DEFAULT_PATHNAME_DEFAULTS.symbolValue()).isJar())
     2191                {
    21832192                LispObject truename = Pathname.truename((Pathname)o, errorIfDoesNotExist);
    2184                 if (truename != null
     2193                if (truename != null && truename != NIL
    21852194                    && truename instanceof Pathname) {
    21862195                    Pathname truePathname = (Pathname)truename;
  • trunk/abcl/src/org/armedbear/lisp/asdf.lisp

    r13702 r13704  
    16511651                   (*default-pathname-defaults*
    16521652                    (pathname-directory-pathname pathname)))
    1653                ;;; XXX Kludge for ABCL ticket #181
    1654                #+abcl
    1655                (when (ext:pathname-jar-p pathname)
    1656                  (setf *default-pathname-defaults*
    1657                        (make-pathname :device nil :defaults *default-pathname-defaults*)))
    16581653               (asdf-message (compatfmt "~&~@<; ~@;Loading system definition from ~A into ~A~@:>~%")
    16591654                             pathname package)
  • trunk/abcl/test/lisp/abcl/jar-pathname.lisp

    r13698 r13704  
    485485;;; TODO Make reasons for failure more clear
    486486(deftest jar-pathname.truename.1
    487     (let* ((abcl (slot-value (asdf:find-system 'abcl) 'asdf::absolute-pathname))
    488            (jar (pathname (format nil "jar:file:~A/dist/abcl-contrib.jar!/jss/jss.asd" (namestring abcl))))
    489            (jar-dir (make-pathname :defaults jar :name nil :type nil))
    490            (defaults *default-pathname-defaults*))
    491       (let ((*default-pathname-defaults* jar-dir))
    492         (not (probe-file (merge-pathnames jar)))))
     487    (let* ((abcl
     488            (slot-value (asdf:find-system 'abcl) 'asdf::absolute-pathname))
     489           (jar-entry
     490            (pathname (format nil "jar:file:~A/dist/abcl-contrib.jar!/jss/jss.asd" (namestring abcl))))
     491           (jar-entry-dir
     492            (make-pathname :defaults jar-entry :name nil :type nil))
     493           (defaults
     494            *default-pathname-defaults*))
     495      (let ((*default-pathname-defaults* jar-entry-dir))
     496        (not (probe-file (merge-pathnames jar-entry)))))
    493497  nil)
    494498 
Note: See TracChangeset for help on using the changeset viewer.