about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-01T14·40+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-01T14·40+0200
commite24e2caaaf2dfd97bfa483800402f21049a42907 (patch)
tree5dfc2406711587ad414ae7940e0e9e0422d9cbc3
parentcf198952d02aae5585e9bb895577b5b4e7b25707 (diff)
Skip substituters with an incompatible store directory
-rw-r--r--src/libstore/build.cc5
-rw-r--r--src/libstore/local-store.cc2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 7be1571cbb16..9316c069eaa0 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -3132,6 +3132,11 @@ void SubstitutionGoal::tryNext()
     sub = subs.front();
     subs.pop_front();
 
+    if (sub->storeDir != worker.store.storeDir) {
+        tryNext();
+        return;
+    }
+
     try {
         // FIXME: make async
         info = sub->queryPathInfo(storePath);
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 32f4e31e07e4..7588d4b073a9 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -787,6 +787,7 @@ PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
 {
     PathSet res;
     for (auto & sub : getDefaultSubstituters()) {
+        if (sub->storeDir != storeDir) continue;
         if (!sub->wantMassQuery()) continue;
         for (auto & path : paths) {
             if (res.count(path)) continue;
@@ -804,6 +805,7 @@ void LocalStore::querySubstitutablePathInfos(const PathSet & paths,
     SubstitutablePathInfos & infos)
 {
     for (auto & sub : getDefaultSubstituters()) {
+        if (sub->storeDir != storeDir) continue;
         for (auto & path : paths) {
             if (infos.count(path)) continue;
             debug(format("checking substituter ‘%s’ for path ‘%s’")