(!cold-init-forms
(setf *!deferred-use-packages* nil))
-;;; FIXME: I rewrote this. Test it and the stuff that calls it.
+(define-condition bootstrap-package-not-found (condition)
+ ((name :initarg :name :reader bootstrap-package-name)))
+(defun debootstrap-package (&optional condition)
+ (invoke-restart
+ (find-restart-or-control-error 'debootstrap-package condition)))
+
(defun find-package (package-designator)
(flet ((find-package-from-string (string)
(declare (type string string))
- (values (gethash string *package-names*))))
- (declare (inline find-package-from-string))
+ (let ((packageoid (gethash string *package-names*)))
+ (when (and (null packageoid)
+ (not *in-package-init*) ; KLUDGE
+ (let ((mismatch (mismatch "SB!" string)))
+ (and mismatch (= mismatch 3))))
+ (restart-case
+ (signal 'bootstrap-package-not-found :name string)
+ (debootstrap-package ()
+ (return-from find-package
+ (if (string= string "SB!XC")
+ (find-package "COMMON-LISP")
+ (find-package
+ (substitute #\- #\! string :count 1)))))))
+ packageoid)))
(typecase package-designator
(package package-designator)
(symbol (find-package-from-string (symbol-name package-designator)))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.10.71"
+"0.8.10.72"