From 198c91aca485837b1c68af2a7ad95e8fe4737a04 Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <fare@tunes.org>
Date: Mon, 5 Dec 2016 23:36:51 -0500
Subject: [PATCH] Fix bad-system-name for "logical" .asd pathnames

Downcase logical pathnames.

Actually, we should probably preserve case on implementations that
non-compliantly preserve case for logical pathnames. Sigh.
---
 parse-defsystem.lisp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/parse-defsystem.lisp b/parse-defsystem.lisp
index a4ae8e714..101ecef5b 100644
--- a/parse-defsystem.lisp
+++ b/parse-defsystem.lisp
@@ -290,10 +290,11 @@ system names contained using COERCE-NAME. Return the result."
     (nest
      (with-asdf-cache ())
      (let* ((name (coerce-name name))
-            (source-file (if sfp source-file (resolve-symlinks* (load-pathname))))
-            (asd-name (and source-file
-                           (equalp "asd" (pathname-type source-file))
-                           (pathname-name source-file)))
+            (source-file (if sfp source-file (resolve-symlinks* (load-pathname))))))
+     (flet ((fix-case (x) (if (logical-pathname-p source-file) (string-downcase x) x))))
+     (let* ((asd-name (and source-file
+                           (equal "asd" (fix-case (pathname-type source-file)))
+                           (fix-case (pathname-name source-file))))
             (primary-name (primary-system-name name)))
        (when (and asd-name (not (equal asd-name primary-name)))
          (warn (make-condition 'bad-system-name :source-file source-file :name name))))
-- 
GitLab