From 235dce5ae5ed1383c857b6a432a63b44e77e383b Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Mon, 11 Feb 2013 12:48:54 +0100 Subject: [PATCH] 2.28.7: have defsystem-depends-on takes arbitrary specs, not just names. Fixes lp#1027521. --- asdf.asd | 2 +- component.lisp | 2 ++ defsystem.lisp | 6 ++++-- header.lisp | 2 +- test/test-version.script | 34 ++++++++++++++++------------------ upgrade.lisp | 2 +- version.lisp-expr | 2 +- 7 files changed, 26 insertions(+), 24 deletions(-) diff --git a/asdf.asd b/asdf.asd index 92f7fe3e5..14f4fd291 100644 --- a/asdf.asd +++ b/asdf.asd @@ -74,7 +74,7 @@ :licence "MIT" :description "Another System Definition Facility" :long-description "ASDF builds Common Lisp software organized into defined systems." - :version "2.28.6" ;; to be automatically updated by make bump-version + :version "2.28.7" ;; 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/component.lisp b/component.lisp index a00cdeb35..7f6c8ed95 100644 --- a/component.lisp +++ b/component.lisp @@ -55,6 +55,8 @@ another pathname in a degenerate way.")) (defgeneric version-satisfies (component version)) (defgeneric component-version (component)) (defgeneric (setf component-version) (new-version component)) + (defgeneric component-parent (component)) + (defmethod component-parent ((component null)) (declare (ignorable component)) nil) ;; Backward compatible way of computing the FILE-TYPE of a component. ;; TODO: find users, have them stop using that, remove it for ASDF4. diff --git a/defsystem.lisp b/defsystem.lisp index c1540b5fa..9d8444ec4 100644 --- a/defsystem.lisp +++ b/defsystem.lisp @@ -189,8 +189,10 @@ (make-instance 'system :name name :source-file source-file)))) (system (reset-system (cdr registered!) :name name :source-file source-file)) - (component-options (remove-plist-key :class options))) - (apply 'load-systems defsystem-depends-on) + (component-options (remove-plist-key :class options)) + (defsystem-dependencies (loop :for spec :in defsystem-depends-on :collect + (resolve-dependency-spec nil spec)))) + (apply 'load-systems defsystem-dependencies) ;; We change-class AFTER we loaded the defsystem-depends-on ;; since the class might be defined as part of those. (let ((class (class-for-type nil class))) diff --git a/header.lisp b/header.lisp index 9efcb6192..a749020ac 100644 --- a/header.lisp +++ b/header.lisp @@ -1,5 +1,5 @@ ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*- -;;; This is ASDF 2.28.6: Another System Definition Facility. +;;; This is ASDF 2.28.7: Another System Definition Facility. ;;; ;;; Feedback, bug reports, and patches are all welcome: ;;; please mail to <asdf-devel@common-lisp.net>. diff --git a/test/test-version.script b/test/test-version.script index 0c5d32e1a..869496cca 100644 --- a/test/test-version.script +++ b/test/test-version.script @@ -1,23 +1,21 @@ ;;; -*- Lisp -*- +(def-test-system :versioned-system-1 + :pathname #.*test-directory* + :version "1.0") +(def-test-system :versioned-system-2 + :pathname #.*test-directory* + :version "1.1") -(progn - (def-test-system :versioned-system-1 - :pathname #.*test-directory* - :version "1.0") +(def-test-system :versioned-system-3 + :defsystem-depends-on ((:version :test-asdf/file2 "2.1")) + :pathname #.*test-directory* + :version "1.2") - (def-test-system :versioned-system-2 - :pathname #.*test-directory* - :version "1.1") - - (def-test-system :versioned-system-3 - :pathname #.*test-directory* - :version "1.2") - - (flet ((test (name v &optional (true t)) - (or (eq true (version-satisfies (find-system name) v)) - (error "no satisfaction: ~S version ~A not ~A" name v true)))) - (test :versioned-system-1 "1.0") - (test :versioned-system-2 "1.0") - (test :versioned-system-3 "2.0" nil))) +(defun vtest (name v &optional (true t)) + (or (eq true (version-satisfies (find-system name) v)) + (error "no satisfaction: ~S version ~A not ~A" name v true))) +(vtest :versioned-system-1 "1.0") +(vtest :versioned-system-2 "1.0") +(vtest :versioned-system-3 "2.0" nil) diff --git a/upgrade.lisp b/upgrade.lisp index 9c2432105..3593adc33 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.28.6") + (asdf-version "2.28.7") (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 afdb49991..17fe02a28 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -1 +1 @@ -"2.28.6" +"2.28.7" -- GitLab