projects/guix·commit f00515b4

vm: Filter out file systems that refer to UUIDs or labels.

f00515b4 · Ludovic Courtès <[email protected]> · 2017-11-30 16:14:12 +01:00

* gnu/system/vm.scm (virtualized-operating-system)[user-file-systems]:
Filter out things that refer to file system UUIDs or labels.
Commit
f00515b4831cbeef7ef4ee9dcc0079ecdadb705b
Parents
1d0865c1

Changes

1 files changed · +7 −1

FileStatusAddDelContent
gnu/system/vm.scmmodified+7−1View file

gnu/system/vm.scm

View file
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 3ddb41d..a5fe48e 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -554,7 +554,13 @@ environment with the store shared with the host. MAPPINGS is a list of
(or (string=? target (%store-prefix))
(string=? target "/")
(and (eq? 'device (file-system-title fs))
- (string-prefix? "/dev/" source)))))
+ (string-prefix? "/dev/" source))
+
+ ;; Labels and UUIDs are necessarily invalid in the VM.
+ (and (file-system-mount? fs)
+ (or (eq? 'label (file-system-title fs))
+ (eq? 'uuid (file-system-title fs))
+ (uuid? source))))))
(operating-system-file-systems os)))
(define virtual-file-systems