guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch core-updates-frozen updated: store: 'mapm/accumulate-builds' does


From: guix-commits
Subject: branch core-updates-frozen updated: store: 'mapm/accumulate-builds' does not compare stores with 'eq?'.
Date: Tue, 09 Nov 2021 18:43:14 -0500

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch core-updates-frozen
in repository guix.

The following commit(s) were added to refs/heads/core-updates-frozen by this 
push:
     new 745d3a9  store: 'mapm/accumulate-builds' does not compare stores with 
'eq?'.
745d3a9 is described below

commit 745d3a9b44f93af6fa84468b4b846d1104a73007
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Nov 10 00:39:10 2021 +0100

    store: 'mapm/accumulate-builds' does not compare stores with 'eq?'.
    
    Fixes <https://issues.guix.gnu.org/51732>.
    Regression introduced in 2015d3f042870860efef10e801b93eacc0742d38.
    
    The (eq? store expected-store) comparison doesn't work on this branch
    where the functional cache, with 'cache-object-mapping', is used
    extensively, thereby changing the store's object identity.
    
    * guix/store.scm (build-accumulator): Compare the socket of STORE and
    EXPECTED-STORE rather than the store themselves.
---
 guix/store.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/guix/store.scm b/guix/store.scm
index 7388953..a93e959 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1353,7 +1353,11 @@ on the build output of a previous derivation."
   "Return a build handler that accumulates THINGS and returns an <unresolved>
 object, only for build requests on EXPECTED-STORE."
   (lambda (continue store things mode)
-    (if (and (eq? store expected-store)
+    ;; Note: Do not compare STORE and EXPECTED-STORE with 'eq?' because
+    ;; 'cache-object-mapping' and similar functional "setters" change the
+    ;; store's object identity.
+    (if (and (eq? (store-connection-socket store)
+                  (store-connection-socket expected-store))
              (= mode (build-mode normal)))
         (unresolved things continue)
         (continue #t))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]