linux-container: 'eval/container' correctly passes -L and -C flags.
This fixes a type error. * gnu/system/linux-container.scm (eval/container): Use 'append-map', not 'map'. * tests/containers.scm ("eval/container, non-empty load path"): New test.
This commit is contained in:
parent
f9c0400392
commit
96b35998e6
|
@ -257,9 +257,11 @@ effects."
|
||||||
(lowered-gexp-guile lowered))
|
(lowered-gexp-guile lowered))
|
||||||
"/bin/guile")
|
"/bin/guile")
|
||||||
"guile"
|
"guile"
|
||||||
(append (map (lambda (directory) `("-L" ,directory))
|
(append (append-map (lambda (directory)
|
||||||
|
`("-L" ,directory))
|
||||||
(lowered-gexp-load-path lowered))
|
(lowered-gexp-load-path lowered))
|
||||||
(map (lambda (directory) `("-C" ,directory))
|
(append-map (lambda (directory)
|
||||||
|
`("-C" ,directory))
|
||||||
(lowered-gexp-load-compiled-path
|
(lowered-gexp-load-compiled-path
|
||||||
lowered))
|
lowered))
|
||||||
(list "-c"
|
(list "-c"
|
||||||
|
|
|
@ -269,4 +269,31 @@
|
||||||
(lset= string=? (cons* "." ".." (map basename reqs))
|
(lset= string=? (cons* "." ".." (map basename reqs))
|
||||||
(pk (call-with-input-file result read))))))))))
|
(pk (call-with-input-file result read))))))))))
|
||||||
|
|
||||||
|
(test-assert "eval/container, non-empty load path"
|
||||||
|
(call-with-temporary-directory
|
||||||
|
(lambda (directory)
|
||||||
|
(define store
|
||||||
|
(open-connection-for-tests))
|
||||||
|
(define result
|
||||||
|
(string-append directory "/r"))
|
||||||
|
(define requisites*
|
||||||
|
(store-lift requisites))
|
||||||
|
|
||||||
|
(mkdir result)
|
||||||
|
(run-with-store store
|
||||||
|
(mlet %store-monad ((status (eval/container
|
||||||
|
(with-imported-modules '((guix build utils))
|
||||||
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(mkdir-p "/result/a/b/c")))
|
||||||
|
#:mappings
|
||||||
|
(list (file-system-mapping
|
||||||
|
(source result)
|
||||||
|
(target "/result")
|
||||||
|
(writable? #t))))))
|
||||||
|
(close-connection store)
|
||||||
|
(return (and (zero? status)
|
||||||
|
(file-is-directory?
|
||||||
|
(string-append result "/a/b/c")))))))))
|
||||||
|
|
||||||
(test-end)
|
(test-end)
|
||||||
|
|
Loading…
Reference in New Issue