From d64cfb86e947e49d55eacf5bebaa9f3e368dd94a Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <fare@tunes.org> Date: Wed, 18 Nov 2009 08:33:12 -0500 Subject: [PATCH] Yet another pathname tweak, so we can atomically rename in presence of ASDF output redirection. --- asdf-ops.lisp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/asdf-ops.lisp b/asdf-ops.lisp index fc7490f..3b81068 100644 --- a/asdf-ops.lisp +++ b/asdf-ops.lisp @@ -183,9 +183,10 @@ to the base of the system." (add-initargs system compspec initargs)))) (defmethod asdf:perform ((op dependency-op) (c component-file)) - (let ((tmp-file-name (format nil "~A-~A" - (first (asdf:output-files op c)) - (get-universal-time)))) + (let* ((destination-file (first (asdf:output-files op c))) + (tmp-file-name (format nil "~A-~A" + destination-file + (get-universal-time)))) (ensure-directories-exist tmp-file-name) (with-open-file (component-stream tmp-file-name :direction :output @@ -228,12 +229,11 @@ to the base of the system." ;; :cull-redundant cull-redundant ;; :debug-object-types debug-object-types :base-pathname base-pathname)))))) - (let ((destination-file (first (asdf:output-files op c)))) - #+clisp - (posix:copy-file tmp-file-name destination-file :method :rename) - #-clisp - (rename-file tmp-file-name destination-file - #+clozure :if-exists #+clozure :rename-and-delete)))) + #+clisp + (posix:copy-file tmp-file-name destination-file :method :rename) + #-clisp + (rename-file tmp-file-name destination-file + #+clozure :if-exists #+clozure :rename-and-delete))) ;;; Reading the component list back into asdf defsystems -- GitLab