mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 14:07:01 +01:00
install: Really overwrite TARGET/var/guix/profiles/system-1-link.
* gnu/build/install.scm (populate-root-file-system): Delete system-1-link under TARGET, not under /. Use 'catch' and check for EEXIST instead of (false-if-exception (delete-file ...)).
This commit is contained in:
parent
7522a0160b
commit
aea9b23213
1 changed files with 13 additions and 3 deletions
|
@ -133,9 +133,19 @@ (define (populate-root-file-system system target)
|
||||||
(directives (%store-directory)))
|
(directives (%store-directory)))
|
||||||
|
|
||||||
;; Add system generation 1.
|
;; Add system generation 1.
|
||||||
(false-if-exception (delete-file "/var/guix/profiles/system-1-link"))
|
(let ((generation-1 (string-append target
|
||||||
(symlink system
|
"/var/guix/profiles/system-1-link")))
|
||||||
(string-append target "/var/guix/profiles/system-1-link")))
|
(let try ()
|
||||||
|
(catch 'system-error
|
||||||
|
(lambda ()
|
||||||
|
(symlink system generation-1))
|
||||||
|
(lambda args
|
||||||
|
;; If GENERATION-1 already exists, overwrite it.
|
||||||
|
(if (= EEXIST (system-error-errno args))
|
||||||
|
(begin
|
||||||
|
(delete-file generation-1)
|
||||||
|
(try))
|
||||||
|
(apply throw args)))))))
|
||||||
|
|
||||||
(define (reset-timestamps directory)
|
(define (reset-timestamps directory)
|
||||||
"Reset the timestamps of all the files under DIRECTORY, so that they appear
|
"Reset the timestamps of all the files under DIRECTORY, so that they appear
|
||||||
|
|
Loading…
Reference in a new issue