Commit 0d7e2a1f authored by Robert Goldman's avatar Robert Goldman
Browse files

Draft: Iss108

parent 9dc59bb2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -82,6 +82,13 @@
  (when (boundp 'excl:*warn-on-nested-reader-conditionals*)
    (setf excl:*warn-on-nested-reader-conditionals* uiop/common-lisp::*acl-warn-save*))

  #+(and allegro allegro-v10.1) ;; check for patch needed for upgradeability
  (unless (assoc "ma040" (cdr (assoc :lisp sys:*patches*)) :test 'equal)
    (warn 'asdf-install-warning
          :format-control "On Allegro Common Lisp 10.1, patch pma040 is ~
needed for correct ASDF upgrading. Please update your Allegro image ~
using (SYS:UPDATE-ALLEGRO)."))

  ;; Advertise the features we provide.
  (dolist (f '(:asdf :asdf2 :asdf3 :asdf3.1 :asdf3.2 :asdf3.3)) (pushnew f *features*))

+15 −1
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@
   #:*post-upgrade-cleanup-hook* #:cleanup-upgraded-asdf
   ;; There will be no symbol left behind!
   #:with-asdf-deprecation
   #:intern*)
   #:intern*
   #:asdf-install-warning)
  (:import-from :uiop/package #:intern* #:find-symbol*))
(in-package :asdf/upgrade)

@@ -173,6 +174,19 @@ previously-loaded version of ASDF."
            (call-functions (reverse *post-upgrade-cleanup-hook*)))
          t))))

  (define-condition asdf-install-warning (simple-condition warning)
    ((format-control
      :initarg :format-control)
     (format-arguments
      :initarg :format-arguments
      :initform nil))
    (:documentation "Warning class for issues related to upgrading or loading ASDF.")
    (:report (lambda (c s)
               (format s "WARNING: ~?"
                       (slot-value c 'format-control)
                       (slot-value c 'format-arguments)))))


  (defun upgrade-asdf ()
    "Try to upgrade of ASDF. If a different version was used, return T.
   We need do that before we operate on anything that may possibly depend on ASDF."