summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-07 22:57:54 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-08 00:06:45 +0200
commita8afb9aed320d3d3ce026936cd5fc2bdd65b331b (patch)
tree00b79e413e97502ab5bf471bbdba2ce17092220f /guix
parentd7facc660394ce5575b554abdb19a70f0a389082 (diff)
store: 'run-with-store' initializes %CURRENT-TARGET-SYSTEM to #f.
* guix/store.scm (run-with-store): Set %CURRENT-TARGET-SYSTEM to #f. * tests/gexp.scm ("gexp->derivation vs. %current-target-system"): New test.
Diffstat (limited to 'guix')
-rw-r--r--guix/store.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 7b13334952..39e5faf6c8 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -996,8 +996,12 @@ permission bits are kept."
(system (%current-system)))
"Run MVAL, a monadic value in the store monad, in STORE, an open store
connection, and return the result."
+ ;; Initialize the dynamic bindings here to avoid bad surprises. The
+ ;; difficulty lies in the fact that dynamic bindings are resolved at
+ ;; bind-time and not at call time, which can be disconcerting.
(parameterize ((%guile-for-build guile-for-build)
- (%current-system system))
+ (%current-system system)
+ (%current-target-system #f))
(call-with-values (lambda ()
(run-with-state mval store))
(lambda (result store)