From 15d299874c635d14a84710005d0ed4b05968ff6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 18 May 2014 19:11:53 +0200 Subject: [PATCH] vm: Avoid resetting timestamps twice. * guix/build/vm.scm (initialize-hard-disk): Don't call 'reset-timestamps' when REGISTER-CLOSURES? is true. * guix/build/install.scm (register-closure): Mention timestamps in docstring. --- guix/build/install.scm | 2 +- guix/build/vm.scm | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/build/install.scm b/guix/build/install.scm index a0be6e9d39..564735a7f6 100644 --- a/guix/build/install.scm +++ b/guix/build/install.scm @@ -103,7 +103,7 @@ as created and modified at the Epoch." (define (register-closure store closure) "Register CLOSURE in STORE, where STORE is the directory name of the target store and CLOSURE is the name of a file containing a reference graph as used -by 'guix-register'." +by 'guix-register'. As a side effect, this resets timestamps on store files." (let ((status (system* "guix-register" "--prefix" store closure))) (unless (zero? status) diff --git a/guix/build/vm.scm b/guix/build/vm.scm index b9bb66cdb7..e67b431b5a 100644 --- a/guix/build/vm.scm +++ b/guix/build/vm.scm @@ -211,7 +211,10 @@ further populate the partition." (unless (install-grub grub.cfg "/dev/sda" target-directory) (error "failed to install GRUB")) - (reset-timestamps target-directory) + ;; 'guix-register' resets timestamps and everything, so no need to do it + ;; once more in that case. + (unless register-closures? + (reset-timestamps target-directory)) (zero? (system* "umount" target-directory)))