From 08635fc3ca5565c6e7c0f1fbe15ac057d5b1090b Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Tue, 29 Jan 2013 14:34:04 -0500
Subject: [PATCH] 2.26.167: fix mis-parenthesization and bad format control in
 previous package refactoring.

Also, rename ensure-pathname-absolute to ensure-absolute-pathname,
to avoid nasty messages while upgrading.
Fix upgrade test.
---
 action.lisp              |  2 +-
 asdf.asd                 |  2 +-
 defsystem.lisp           |  4 ++--
 filesystem.lisp          |  2 +-
 find-system.lisp         |  4 ++--
 header.lisp              |  2 +-
 package.lisp             | 11 ++++++-----
 pathname.lisp            |  6 +++---
 test/script-support.lisp |  3 ++-
 upgrade.lisp             |  2 +-
 version.lisp-expr        |  2 +-
 11 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/action.lisp b/action.lisp
index 358154f5f..47ab1113f 100644
--- a/action.lisp
+++ b/action.lisp
@@ -174,7 +174,7 @@ You can put together sentences using this phrase."))
               (absolute-pathnames
                 (loop
                   :for pathname :in pathnames
-                  :collect (ensure-pathname-absolute pathname directory))))
+                  :collect (ensure-absolute-pathname pathname directory))))
          ;; 2- Translate those pathnames as required
          (if fixedp
              absolute-pathnames
diff --git a/asdf.asd b/asdf.asd
index c910bd787..a7142bc8b 100644
--- a/asdf.asd
+++ b/asdf.asd
@@ -66,7 +66,7 @@
   :licence "MIT"
   :description "Another System Definition Facility"
   :long-description "ASDF builds Common Lisp software organized into defined systems."
-  :version "2.26.166" ;; to be automatically updated by make bump-version
+  :version "2.26.167" ;; to be automatically updated by make bump-version
   :depends-on ()
   #+asdf3 :encoding #+asdf3 :utf-8
   ;; For most purposes, asdf itself specially counts as a builtin system.
diff --git a/defsystem.lisp b/defsystem.lisp
index 1b64bfb14..2d2aabf99 100644
--- a/defsystem.lisp
+++ b/defsystem.lisp
@@ -32,9 +32,9 @@
   ;; If no absolute pathname was found, we return NIL.
   (check-type pathname (or null string pathname))
   (resolve-symlinks*
-   (ensure-pathname-absolute
+   (ensure-absolute-pathname
     (parse-unix-namestring pathname :type :directory)
-    #'(lambda () (ensure-pathname-absolute
+    #'(lambda () (ensure-absolute-pathname
                   (load-pathname) 'get-pathname-defaults nil))
     nil)))
 
diff --git a/filesystem.lisp b/filesystem.lisp
index cfe91494c..c2ec9ee6c 100644
--- a/filesystem.lisp
+++ b/filesystem.lisp
@@ -223,7 +223,7 @@ or the original (parsed) pathname if it is false (the default)."
     (when (typep pathname '(or null logical-pathname)) (return pathname))
     (let ((p pathname))
       (unless (absolute-pathname-p p)
-        (setf p (or (absolute-pathname-p (ensure-pathname-absolute p 'get-pathname-defaults nil))
+        (setf p (or (absolute-pathname-p (ensure-absolute-pathname p 'get-pathname-defaults nil))
                     (return p))))
       (when (logical-pathname-p p) (return p))
       (let ((found (probe-file* p :truename t)))
diff --git a/find-system.lisp b/find-system.lisp
index cd36c20d3..856889f4e 100644
--- a/find-system.lisp
+++ b/find-system.lisp
@@ -159,9 +159,9 @@ Going forward, we recommend new users should be using the source-registry.
   (block nil
     (when (directory-pathname-p defaults)
       (if-let (file (probe-file*
-                     (ensure-pathname-absolute
+                     (ensure-absolute-pathname
                       (parse-unix-namestring name :type "asd")
-                      #'(lambda () (ensure-pathname-absolute defaults 'get-pathname-defaults nil))
+                      #'(lambda () (ensure-absolute-pathname defaults 'get-pathname-defaults nil))
                       nil)
                      :truename truename))
         (return file))
diff --git a/header.lisp b/header.lisp
index c83a0194b..8ae2d51c5 100644
--- a/header.lisp
+++ b/header.lisp
@@ -1,5 +1,5 @@
 ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
-;;; This is ASDF 2.26.166: Another System Definition Facility.
+;;; This is ASDF 2.26.167: Another System Definition Facility.
 ;;;
 ;;; Feedback, bug reports, and patches are all welcome:
 ;;; please mail to <asdf-devel@common-lisp.net>.
diff --git a/package.lisp b/package.lisp
index 8c8ecc7d4..9b3968270 100644
--- a/package.lisp
+++ b/package.lisp
@@ -355,8 +355,8 @@ or when loading the package is optional."
               (package-name from-package)
               (or (home-package-p import-me from-package) (symbol-package-name import-me))
               (package-name to-package) status
-              (and status (or (home-package-p existing to-package) (symbol-package-name existing))))
-           (shadowing-import import-me to-package)))))))
+              (and status (or (home-package-p existing to-package) (symbol-package-name existing)))))
+           (shadowing-import import-me to-package))))))
   (defun ensure-import (name to-package from-package shadowed imported)
     (check-type name string)
     (check-type to-package package)
@@ -449,7 +449,7 @@ or when loading the package is optional."
              (remhash name inherited)
              (ensure-shadowing-import name to-package (second in) shadowed imported))
             (im
-             (error "Symbol ~S import from ~S~:[~*~; actually ~:[~*uninterned~;from ~S~]~] conflicts with existing symbol in ~S~:[~*~; actually ~:[~*uninterned~;from ~S~]~]"
+             (error "Symbol ~S import from ~S~:[~; actually ~:[uninterned~;~:*from ~S~]~] conflicts with existing symbol in ~S~:[~; actually ~:[uninterned~;from ~:*~S~]~]"
                     name (package-name from-package)
                     (home-package-p symbol from-package) (symbol-package-name symbol)
                     (package-name to-package)
@@ -617,8 +617,9 @@ or when loading the package is optional."
       (loop :for (p . syms) :in shadowing-import-from
             :for pp = (find-package* p) :do
               (dolist (sym syms) (ensure-shadowing-import (string sym) package pp shadowed imported)))
-      (dolist (p mix)
-        (do-external-symbols (sym p) (ensure-mix (symbol-name sym) sym package p shadowed imported inherited)))
+      (loop :for p :in mix
+            :for pp = (find-package* p) :do
+              (do-external-symbols (sym pp) (ensure-mix (symbol-name sym) sym package pp shadowed imported inherited)))
       (loop :for (p . syms) :in import-from
             :for pp = (find-package p) :do
               (dolist (sym syms) (ensure-import (symbol-name sym) package pp shadowed imported)))
diff --git a/pathname.lisp b/pathname.lisp
index 2164caf04..bfa713ea1 100644
--- a/pathname.lisp
+++ b/pathname.lisp
@@ -25,7 +25,7 @@
    #:split-unix-namestring-directory-components
    ;; Absolute and relative pathnames
    #:subpathname #:subpathname*
-   #:ensure-pathname-absolute
+   #:ensure-absolute-pathname
    #:pathname-root #:pathname-host-pathname
    #:subpathp
    ;; Checking constraints
@@ -537,10 +537,10 @@ then it is merged with the PATHNAME-DIRECTORY-PATHNAME of PATHNAME."
          (let ((enough (enough-namestring maybe-subpath base-pathname)))
            (and (relative-pathname-p enough) (pathname enough))))))
 
-(defun* ensure-pathname-absolute (path &optional defaults (on-error 'error))
+(defun* ensure-absolute-pathname (path &optional defaults (on-error 'error))
   (cond
     ((absolute-pathname-p path))
-    ((stringp path) (ensure-pathname-absolute (pathname path) defaults on-error))
+    ((stringp path) (ensure-absolute-pathname (pathname path) defaults on-error))
     ((not (pathnamep path)) (call-function on-error "not a valid pathname designator ~S" path))
     ((let ((default-pathname (if (pathnamep defaults) defaults (call-function defaults))))
        (or (if (absolute-pathname-p default-pathname)
diff --git a/test/script-support.lisp b/test/script-support.lisp
index a70586ede..f51cf074f 100644
--- a/test/script-support.lisp
+++ b/test/script-support.lisp
@@ -465,7 +465,8 @@ is bound, write a message and exit on an error.  If
              ((,*asdf-directory*) ,(output-location "asdf"))
              (t ,(output-location "root"))
              :ignore-inherited-configuration)))
-  (set (asym :*central-registry*) `(,*test-directory*))
+  (when (asym :*central-registry* nil nil)
+    (set (asym :*central-registry*) `(,*test-directory*)))
   (when (asym :*asdf-verbose*) (setf (asymval :*asdf-verbose*) t))
   (when (asym :*verbose-out*) (setf (asymval :*verbose-out*) *standard-output*))
   (when (asym :system-source-directory nil nil)
diff --git a/upgrade.lisp b/upgrade.lisp
index 26fbf7e1e..83f63e3ab 100644
--- a/upgrade.lisp
+++ b/upgrade.lisp
@@ -52,7 +52,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
          ;; "3.4.5.67" would be a development version in the official upstream of 3.4.5.
          ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
          ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
-         (asdf-version "2.26.166")
+         (asdf-version "2.26.167")
          (existing-version (asdf-version)))
     (setf *asdf-version* asdf-version)
     (when (and existing-version (not (equal asdf-version existing-version)))
diff --git a/version.lisp-expr b/version.lisp-expr
index 0211e0c14..e5bad3e72 100644
--- a/version.lisp-expr
+++ b/version.lisp-expr
@@ -1 +1 @@
-"2.26.166"
+"2.26.167"
-- 
GitLab