From bf954c460606b534e5c0669f3e7675cb7804b004 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Mon, 11 Mar 2013 02:19:01 -0400 Subject: [PATCH] 2.32.6: *image-restored-p* flag to avoid double-initialization. Also, fix a warning message in lisp-build. --- asdf.asd | 2 +- header.lisp | 2 +- uiop/image.lisp | 14 +++++++++++++- uiop/lisp-build.lisp | 2 +- upgrade.lisp | 2 +- version.lisp-expr | 2 +- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/asdf.asd b/asdf.asd index 12e18779..c92fc6d7 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.32.5" ;; to be automatically updated by make bump-version + :version "2.32.6" ;; 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/header.lisp b/header.lisp index 34cdbdba..fbc1e785 100644 --- a/header.lisp +++ b/header.lisp @@ -1,5 +1,5 @@ ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*- -;;; This is ASDF 2.32.5: Another System Definition Facility. +;;; This is ASDF 2.32.6: Another System Definition Facility. ;;; ;;; Feedback, bug reports, and patches are all welcome: ;;; please mail to <asdf-devel@common-lisp.net>. diff --git a/uiop/image.lisp b/uiop/image.lisp index 72869446..3f2b2a47 100644 --- a/uiop/image.lisp +++ b/uiop/image.lisp @@ -34,6 +34,9 @@ (defvar *image-restore-hook* nil "Functions to call (in reverse order) when the image is restored") + (defvar *image-restored-p* nil + "Has the image been restored? A boolean, or :in-progress while restoring, :in-regress while dumping") + (defvar *image-prelude* nil "a form to evaluate, or string containing forms to read and evaluate when the image is restarted, but before the entry point is called.") @@ -226,10 +229,17 @@ if we are not called from a directly executable image." ((:lisp-interaction *lisp-interaction*) *lisp-interaction*) ((:restore-hook *image-restore-hook*) *image-restore-hook*) ((:prelude *image-prelude*) *image-prelude*) - ((:entry-point *image-entry-point*) *image-entry-point*)) + ((:entry-point *image-entry-point*) *image-entry-point*) + (if-already-restored '(cerror "RUN RESTORE-IMAGE ANYWAY"))) + (when *image-restored-p* + (if if-already-restored + (call-function if-already-restored "Image already ~:[being ~;~]restored" (eq *image-restored-p* t)) + (return-from restore-image))) (with-fatal-condition-handler () + (setf *image-restored-p* :in-progress) (call-image-restore-hook) (standard-eval-thunk *image-prelude*) + (setf *image-restored-p* t) (let ((results (multiple-value-list (if *image-entry-point* (call-function *image-entry-point*) @@ -248,8 +258,10 @@ if we are not called from a directly executable image." ((:dump-hook *image-dump-hook*) *image-dump-hook*)) (declare (ignorable filename output-name executable)) (setf *image-dumped-p* (if executable :executable t)) + (setf *image-restored-p* :in-regress) (standard-eval-thunk *image-postlude*) (call-image-dump-hook) + (setf *image-restored-p* nil) #-(or clisp clozure cmu lispworks sbcl scl) (when executable (error "Dumping an executable is not supported on this implementation! Aborting.")) diff --git a/uiop/lisp-build.lisp b/uiop/lisp-build.lisp index 1522d336..03bf43b7 100644 --- a/uiop/lisp-build.lisp +++ b/uiop/lisp-build.lisp @@ -53,7 +53,7 @@ Note that ASDF ALWAYS raises an error if it fails to create an output file when "Get current compiler optimization settings, ready to PROCLAIM again" (let ((settings '(speed space safety debug compilation-speed #+(or cmu scl) c::brevity))) #-(or clisp clozure cmu ecl sbcl scl) - (warn "xcvb-driver::get-optimization-settings does not support your implementation. Please help me fix that.") + (warn "~S does not support your implementation. Please help me fix that." 'get-optimization-settings) #.`(loop :for x :in settings ,@(or #+clozure '(:for v :in '(ccl::*nx-speed* ccl::*nx-space* ccl::*nx-safety* ccl::*nx-debug* ccl::*nx-cspeed*)) #+ecl '(:for v :in '(c::*speed* c::*space* c::*safety* c::*debug*)) diff --git a/upgrade.lisp b/upgrade.lisp index fc1a61c4..a9511756 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.32.5") + (asdf-version "2.32.6") (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 4dc184c4..1835bc78 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -1 +1 @@ -"2.32.5" +"2.32.6" -- GitLab