mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu: vm: Clear timestamps on the imported files, like in the store.
* gnu/system/vm.scm (qemu-image): Clear timestamps on the copied files.
This commit is contained in:
parent
6bf25b7b05
commit
8ab73e91d6
1 changed files with 16 additions and 0 deletions
|
@ -75,6 +75,9 @@ (define* (expression->derivation-in-linux-vm store name exp
|
|||
When REFERENCES-GRAPHS is true, it must be a list of file name/store path
|
||||
pairs, as for `derivation'. The files containing the reference graphs are
|
||||
made available under the /xchg CIFS share."
|
||||
;; FIXME: Allow use of macros from other modules, as done in
|
||||
;; `build-expression->derivation'.
|
||||
|
||||
(define input-alist
|
||||
(map (match-lambda
|
||||
((input (? package? package))
|
||||
|
@ -294,6 +297,19 @@ (define (graph-from-file file)
|
|||
(primitive-load populate)
|
||||
(chdir "/")))
|
||||
|
||||
(display "clearing file timestamps...\n")
|
||||
(for-each (lambda (file)
|
||||
(let ((s (lstat file)))
|
||||
;; XXX: Guile uses libc's 'utime' function
|
||||
;; (not 'futime'), so the timestamp of
|
||||
;; symlinks cannot be changed, and there
|
||||
;; are symlinks here pointing to
|
||||
;; /nix/store, which is the host,
|
||||
;; read-only store.
|
||||
(unless (eq? (stat:type s) 'symlink)
|
||||
(utime file 0 0 0 0))))
|
||||
(find-files "/fs" ".*"))
|
||||
|
||||
(and (zero?
|
||||
(system* grub "--no-floppy"
|
||||
"--boot-directory" "/fs/boot"
|
||||
|
|
Loading…
Reference in a new issue