[armedbear-cvs] r12553 - branches/0.19.x/abcl/src/org/armedbear/lisp
Mark Evenson
mevenson at common-lisp.net
Wed Mar 17 13:22:39 UTC 2010
Author: mevenson
Date: Wed Mar 17 09:22:36 2010
New Revision: 12553
Log:
Backport r12550: Fix loading of packed FASLs which have been renamed.
Modified:
branches/0.19.x/abcl/src/org/armedbear/lisp/Load.java
branches/0.19.x/abcl/src/org/armedbear/lisp/Pathname.java
Modified: branches/0.19.x/abcl/src/org/armedbear/lisp/Load.java
==============================================================================
--- branches/0.19.x/abcl/src/org/armedbear/lisp/Load.java (original)
+++ branches/0.19.x/abcl/src/org/armedbear/lisp/Load.java Wed Mar 17 09:22:36 2010
@@ -163,16 +163,28 @@
mergedPathname = new Pathname(n);
LispObject initTruename = Pathname.truename(mergedPathname);
if (initTruename == null || initTruename.equals(NIL)) {
- String errorMessage
- = "Loadable FASL not found for"
- + "'" + pathname + "'"
- + " in "
- + "'" + mergedPathname + "'";
- if (ifDoesNotExist) {
- return error(new FileError(errorMessage, mergedPathname));
+ // Maybe the enclosing JAR has been renamed?
+ Pathname p = new Pathname(mergedPathname);
+ p.name = Keyword.WILD;
+ p.invalidateNamestring();
+ LispObject result = Pathname.MATCH_WILD_JAR_PATHNAME.execute(p);
+
+ if (result instanceof Cons
+ && ((Cons)result).length() == 1
+ && ((Cons)result).car() instanceof Pathname) {
+ initTruename = (Pathname)result.car();
} else {
- Debug.trace(errorMessage);
- return NIL;
+ String errorMessage
+ = "Loadable FASL not found for "
+ + "'" + pathname + "'"
+ + " in "
+ + "'" + mergedPathname + "'";
+ if (ifDoesNotExist) {
+ return error(new FileError(errorMessage, mergedPathname));
+ } else {
+ Debug.trace(errorMessage);
+ return NIL;
+ }
}
}
truename = (Pathname)initTruename;
Modified: branches/0.19.x/abcl/src/org/armedbear/lisp/Pathname.java
==============================================================================
--- branches/0.19.x/abcl/src/org/armedbear/lisp/Pathname.java (original)
+++ branches/0.19.x/abcl/src/org/armedbear/lisp/Pathname.java Wed Mar 17 09:22:36 2010
@@ -1348,7 +1348,7 @@
}
// ### match-wild-jar-pathname wild-jar-pathname
- private static final Primitive LIST_JAR_DIRECTORY = new pf_match_wild_jar_pathname();
+ static final Primitive MATCH_WILD_JAR_PATHNAME = new pf_match_wild_jar_pathname();
private static class pf_match_wild_jar_pathname extends Primitive {
pf_match_wild_jar_pathname() {
super("match-wild-jar-pathname", PACKAGE_SYS, false, "wild-jar-pathname");
More information about the armedbear-cvs
mailing list