summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-07-08 10:53:41 +0200
committerLudovic Courtès <ludo@gnu.org>2019-07-08 13:05:55 +0200
commitcdf689471a7f360efc798eb6e4dcdc4297d64043 (patch)
tree37bd29d896c04b9ac337377abf740e9c2c04fde1 /guix
parentc7b757c46c91c4c3ddb4b784ae132af119f17ea8 (diff)
channels: Key cached channel derivations by system.
Previously, the channel instance to derivation mapping would be independent of the system. Thus, building the same channel instance for several different systems would always return the derivation that was first computed. This is a followup to c3ab921eed2a471022e9863a94ea521508782e53. * guix/channels.scm (channel-instance-derivations)[instance->derivation]: Pass the current system as a third argument to 'mcached'.
Diffstat (limited to 'guix')
-rw-r--r--guix/channels.scm16
1 files changed, 9 insertions, 7 deletions
diff --git a/guix/channels.scm b/guix/channels.scm
index fcf9fed829..e6bb9b891b 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -349,13 +349,15 @@ INSTANCES."
(resolve-dependencies instances))
(define (instance->derivation instance)
- (mcached (if (eq? instance core-instance)
- (build-channel-instance instance)
- (mlet %store-monad ((core (instance->derivation core-instance))
- (deps (mapm %store-monad instance->derivation
- (edges instance))))
- (build-channel-instance instance core deps)))
- instance))
+ (mlet %store-monad ((system (current-system)))
+ (mcached (if (eq? instance core-instance)
+ (build-channel-instance instance)
+ (mlet %store-monad ((core (instance->derivation core-instance))
+ (deps (mapm %store-monad instance->derivation
+ (edges instance))))
+ (build-channel-instance instance core deps)))
+ instance
+ system)))
(unless core-instance
(let ((loc (and=> (any (compose channel-location channel-instance-channel)