summaryrefslogtreecommitdiff
path: root/gnu/build/install.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/build/install.scm')
-rw-r--r--gnu/build/install.scm16
1 files changed, 13 insertions, 3 deletions
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index 76536daf499..32fbe8efbc4 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -133,9 +133,19 @@ includes /etc, /var, /run, /bin/sh, etc., and all the symlinks to SYSTEM."
133 (directives (%store-directory))) 133 (directives (%store-directory)))
134 134
135 ;; Add system generation 1. 135 ;; Add system generation 1.
136 (false-if-exception (delete-file "/var/guix/profiles/system-1-link")) 136 (let ((generation-1 (string-append target
137 (symlink system 137 "/var/guix/profiles/system-1-link")))
138 (string-append target "/var/guix/profiles/system-1-link"))) 138 (let try ()
139 (catch 'system-error
140 (lambda ()
141 (symlink system generation-1))
142 (lambda args
143 ;; If GENERATION-1 already exists, overwrite it.
144 (if (= EEXIST (system-error-errno args))
145 (begin
146 (delete-file generation-1)
147 (try))
148 (apply throw args)))))))
139 149
140(define (reset-timestamps directory) 150(define (reset-timestamps directory)
141 "Reset the timestamps of all the files under DIRECTORY, so that they appear 151 "Reset the timestamps of all the files under DIRECTORY, so that they appear