2.20.18: Fix ensure-use so it removes packages that should NOT be used.
authorFrancois-Rene Rideau <fare@tunes.org>
Tue, 17 Apr 2012 20:42:17 +0000 (16:42 -0400)
committerFrancois-Rene Rideau <fare@tunes.org>
Tue, 17 Apr 2012 20:42:17 +0000 (16:42 -0400)
This matters if you e.g. open asdf.lisp in LispWorks before you load it,
in which case it will automatically create an ASDF package
with a default use list that pulls in symbols from LispWorks's own defsystem.
Also, export strcat.

asdf.asd
asdf.lisp

index 50afe2b..1d35dd6 100644 (file)
--- a/asdf.asd
+++ b/asdf.asd
@@ -14,7 +14,7 @@
   :licence "MIT"
   :description "Another System Definition Facility"
   :long-description "ASDF builds Common Lisp software organized into defined systems."
-  :version "2.20.17" ;; to be automatically updated by bin/bump-revision
+  :version "2.20.18" ;; to be automatically updated by bin/bump-revision
   :depends-on ()
   :components
   ((:file "asdf")
index 5ecd7b1..32c6c82 100644 (file)
--- a/asdf.lisp
+++ b/asdf.lisp
@@ -1,5 +1,5 @@
 ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; coding: utf-8 -*-
-;;; This is ASDF 2.20.17: Another System Definition Facility.
+;;; This is ASDF 2.20.18: Another System Definition Facility.
 ;;;
 ;;; Feedback, bug reports, and patches are all welcome:
 ;;; please mail to <asdf-devel@common-lisp.net>.
          ;; "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.20.17")
+         (asdf-version "2.20.18")
          (existing-asdf (find-class 'component nil))
          (existing-version *asdf-version*)
          (already-there (equal asdf-version existing-version)))
            (ensure-shadow (package symbols)
              (shadow symbols package))
            (ensure-use (package use)
+             (dolist (used (package-use-list package))
+               (unless (member (package-name used) use :test 'string=)
+                 (unuse-package used)
+                 (do-external-symbols (sym used)
+                   (when (eq sym (find-symbol* sym package))
+                     (remove-symbol sym package)))))
              (dolist (used (reverse use))
                (do-external-symbols (sym used)
                  (unless (eq sym (find-symbol* sym package))
             #:absolute-pathname-p #:ensure-pathname-absolute #:pathname-root
             #:getenv
             #:probe-file*
-            #:find-symbol*
+            #:find-symbol* #:strcat
             #:make-pathname-component-logical #:make-pathname-logical
             #:merge-pathnames* #:coerce-pathname #:subpathname #:subpathname*
             #:pathname-directory-pathname #:pathname-parent-directory-pathname