From 518f4486eacb6d0d91719e77f99e280254d98734 Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Sun, 13 Jan 2013 22:04:49 -0500
Subject: [PATCH] 2.26.91: Package adjustments.

Export more ASDF internals in various packages,
that they may be shared with ASDF/INTERFACE without causing fishiness.
Be less prompt to nuke symbols that may clash.
There are plenty of innocent symbols such as O and C, etc.

Also, disable most of test-encodings when there is no asdf-encodings.
---
 asdf.asd                   |  2 +-
 defsystem.lisp             |  6 ++++--
 find-system.lisp           |  1 +
 header.lisp                |  2 +-
 output-translations.lisp   |  1 +
 package.lisp               | 22 ++++++++++++----------
 source-registry.lisp       |  1 +
 test/test-encodings.script |  3 +++
 upgrade.lisp               |  2 +-
 version.lisp-expr          |  2 +-
 10 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/asdf.asd b/asdf.asd
index 44a1f259c..93b1cff52 100644
--- a/asdf.asd
+++ b/asdf.asd
@@ -15,7 +15,7 @@
   :licence "MIT"
   :description "Another System Definition Facility"
   :long-description "ASDF builds Common Lisp software organized into defined systems."
-  :version "2.26.90" ;; to be automatically updated by bin/bump-revision
+  :version "2.26.91" ;; to be automatically updated by bin/bump-revision
   :depends-on ()
   :components ((:module "build" :components ((:file "asdf"))))
   :in-order-to (#+asdf2.27 (compile-op (monolithic-load-concatenated-source-op generate-asdf))))
diff --git a/defsystem.lisp b/defsystem.lisp
index 2b703f44a..8efea30a8 100644
--- a/defsystem.lisp
+++ b/defsystem.lisp
@@ -9,8 +9,10 @@
    :asdf/backward-internals)
   #+gcl<2.7 (:shadowing-import-from :asdf/compatibility #:type-of)
   (:export
-   #:defsystem #:do-defsystem #:parse-component-form
-   #:*default-component-class*))
+   #:defsystem #:*default-component-class*
+   #:class-for-type #:do-defsystem
+   #:determine-system-pathname #:parse-component-form
+   #:duplicate-names #:sysdef-error-component #:check-component-input))
 (in-package :asdf/defsystem)
 
 ;;; Pathname
diff --git a/find-system.lisp b/find-system.lisp
index 9ce4800ce..b31875169 100644
--- a/find-system.lisp
+++ b/find-system.lisp
@@ -6,6 +6,7 @@
   (:use :common-lisp :asdf/compatibility :asdf/utility :asdf/pathname :asdf/stream :asdf/os
         :asdf/lisp-build :asdf/upgrade :asdf/component :asdf/system)
   (:export
+   #:remove-entry-from-registry #:coerce-entry-to-directory
    #:coerce-name #:find-system #:locate-system #:load-sysdef #:with-system-definitions
    #:system-registered-p #:register-system #:registered-systems #:clear-system #:map-systems
    #:system-definition-error #:missing-component #:missing-requires #:missing-parent
diff --git a/header.lisp b/header.lisp
index 9e2b37055..2308c8633 100644
--- a/header.lisp
+++ b/header.lisp
@@ -1,5 +1,5 @@
 ;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; coding: utf-8 -*-
-;;; This is ASDF 2.26.90: Another System Definition Facility.
+;;; This is ASDF 2.26.91: Another System Definition Facility.
 ;;;
 ;;; Feedback, bug reports, and patches are all welcome:
 ;;; please mail to <asdf-devel@common-lisp.net>.
diff --git a/output-translations.lisp b/output-translations.lisp
index 89dd41f47..f4702b5b7 100644
--- a/output-translations.lisp
+++ b/output-translations.lisp
@@ -5,6 +5,7 @@
   (:recycle :asdf/output-translations :asdf)
   (:use :common-lisp :asdf/utility :asdf/pathname :asdf/os :asdf/lisp-build :asdf/upgrade :asdf/configuration)
   (:export
+   #:*output-translations* #:*output-translation-parameter*
    #:invalid-output-translation
    #:output-translations #:output-translations-initialized-p
    #:initialize-output-translations #:clear-output-translations
diff --git a/package.lisp b/package.lisp
index 903c373f4..905a8aabd 100644
--- a/package.lisp
+++ b/package.lisp
@@ -284,16 +284,16 @@ or when loading the package is optional."
 ;;; ensure-package, define-package
 
 (eval-when (:load-toplevel :compile-toplevel :execute)
-  (defvar *record-fishy-package-changes* '(t))
-  (defvar *fishy-package-changes* '())
+  (defvar *all-package-fishiness* '(t))
+  (defvar *package-fishiness* '())
   (defun flush-fishy ()
-    (when *fishy-package-changes*
-      (push (nreverse *fishy-package-changes*) *record-fishy-package-changes*)
-      (setf *fishy-package-changes* nil)))
+    (when *package-fishiness*
+      (push (nreverse *package-fishiness*) *all-package-fishiness*)
+      (setf *package-fishiness* nil)))
   (defun record-fishy (info)
-    (push info *fishy-package-changes*))
+    (push info *package-fishiness*))
   (macrolet ((when-fishy (&body body)
-               `(when *record-fishy-package-changes* ,@body))
+               `(when *all-package-fishiness* ,@body))
              (fishy (&rest info)
                `(when-fishy (record-fishy (list ,@info)))))
     (defun ensure-package (name &key
@@ -412,8 +412,8 @@ or when loading the package is optional."
                      (when (and status (home-package-p symbol r))
                        (cond
                          (foundp
-                          (fishy :recycled-duplicate name (package-name foundp) (package-name r))
-                          (nuke-symbol symbol))
+                          ;; (nuke-symbol symbol)) -- even simple variable names like O or C will do that.
+                          (fishy :recycled-duplicate name (package-name foundp) (package-name r)))
                          (t
                           (setf recycled symbol foundp r))))))))
              (symbol-recycled-p (sym)
@@ -433,7 +433,9 @@ or when loading the package is optional."
                        (t
                         (when status
                           (unintern existing)
-                          (fishy :ensure-symbol name (symbol-package-name existing) status intern))
+                          (fishy :ensure-symbol name
+                                 (reify-package (symbol-package existing) package)
+                                 status intern))
                         (when intern
                           (intern* name package))))))))
              (ensure-export (name p)
diff --git a/source-registry.lisp b/source-registry.lisp
index a63cc3212..b5de6f38c 100644
--- a/source-registry.lisp
+++ b/source-registry.lisp
@@ -7,6 +7,7 @@
   (:use :common-lisp :asdf/utility :asdf/pathname :asdf/os
         :asdf/upgrade :asdf/find-system :asdf/configuration)
   (:export
+   #:*source-registry* #:*source-registry-parameter* #:*default-source-registries*
    #:invalid-source-registry
    #:source-registry #:source-registry-initialized-p
    #:initialize-source-registry #:clear-source-registry #:*source-registry*
diff --git a/test/test-encodings.script b/test/test-encodings.script
index 502db2f4f..cc62fbb0b 100644
--- a/test/test-encodings.script
+++ b/test/test-encodings.script
@@ -46,6 +46,9 @@
   #-asdf-unicode
   (leave-test "No Unicode support to test on this lisp implementation" 0)
 
+  (unless (find-system :asdf-encodings nil)
+    (leave-test "ASDF-ENCODINGS is not installed next to ASDF. Skipping the rest the test." 0))
+
   ;; NB: recent clozure can autodetect without asdf-encodings with :default (!)
 
   #+(and asdf-unicode sbcl)
diff --git a/upgrade.lisp b/upgrade.lisp
index a61d4a444..fef990db7 100644
--- a/upgrade.lisp
+++ b/upgrade.lisp
@@ -32,7 +32,7 @@
          ;; "2.345.6" would be a development version in the official upstream
          ;; "2.345.0.7" would be your seventh local modification of official release 2.345
          ;; "2.345.6.7" would be your seventh local modification of development version 2.345.6
-         (asdf-version "2.26.90")
+         (asdf-version "2.26.91")
          (existing-asdf (find-class (find-symbol* :component :asdf nil) nil))
          (existing-version *asdf-version*)
          (already-there (equal asdf-version existing-version)))
diff --git a/version.lisp-expr b/version.lisp-expr
index b9a516079..5fc2ad56a 100644
--- a/version.lisp-expr
+++ b/version.lisp-expr
@@ -1 +1 @@
-"2.26.90"
+"2.26.91"
-- 
GitLab