Skip to content
Snippets Groups Projects
Commit d64cfb86 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Yet another pathname tweak, so we can atomically rename in presence of ASDF output redirection.

parent 13425d4a
No related branches found
No related tags found
No related merge requests found
...@@ -183,9 +183,10 @@ to the base of the system." ...@@ -183,9 +183,10 @@ to the base of the system."
(add-initargs system compspec initargs)))) (add-initargs system compspec initargs))))
(defmethod asdf:perform ((op dependency-op) (c component-file)) (defmethod asdf:perform ((op dependency-op) (c component-file))
(let ((tmp-file-name (format nil "~A-~A" (let* ((destination-file (first (asdf:output-files op c)))
(first (asdf:output-files op c)) (tmp-file-name (format nil "~A-~A"
(get-universal-time)))) destination-file
(get-universal-time))))
(ensure-directories-exist tmp-file-name) (ensure-directories-exist tmp-file-name)
(with-open-file (component-stream tmp-file-name (with-open-file (component-stream tmp-file-name
:direction :output :direction :output
...@@ -228,12 +229,11 @@ to the base of the system." ...@@ -228,12 +229,11 @@ to the base of the system."
;; :cull-redundant cull-redundant ;; :cull-redundant cull-redundant
;; :debug-object-types debug-object-types ;; :debug-object-types debug-object-types
:base-pathname base-pathname)))))) :base-pathname base-pathname))))))
(let ((destination-file (first (asdf:output-files op c)))) #+clisp
#+clisp (posix:copy-file tmp-file-name destination-file :method :rename)
(posix:copy-file tmp-file-name destination-file :method :rename) #-clisp
#-clisp (rename-file tmp-file-name destination-file
(rename-file tmp-file-name destination-file #+clozure :if-exists #+clozure :rename-and-delete)))
#+clozure :if-exists #+clozure :rename-and-delete))))
;;; Reading the component list back into asdf defsystems ;;; Reading the component list back into asdf defsystems
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment