summaryrefslogtreecommitdiff
path: root/guix/scripts/system.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-11-14 21:20:46 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-11-14 21:20:46 +0100
commit79ee97a144aaaa890be0724aaf796e2a771179d7 (patch)
treefddd2f20003d60e42eed7a614acea91a13d854d7 /guix/scripts/system.scm
parent7d9d521fbcf1423f66d6f33208c03d5dacb7ba50 (diff)
parente921993c25626541385f191f0463cad8e5e5c5c7 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts/system.scm')
-rw-r--r--guix/scripts/system.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index d2be0cf8fb..9ba9428a08 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -235,6 +235,13 @@ When INSTALL-BOOTLOADER? is true, install bootloader using BOOTCFG."
the ownership of '~a' may be incorrect!~%")
target))
+ ;; If a previous installation was attempted, make sure we start anew; in
+ ;; particular, we don't want to keep a store database that might not
+ ;; correspond to what we're actually putting in the store.
+ (let ((state (string-append target "/var/guix")))
+ (when (file-exists? state)
+ (delete-file-recursively state)))
+
(chmod target #o755)
(let ((os-dir (derivation->output-path os-drv))
(format (lift format %store-monad))