From 38148d1ff469116fa866de221f06933e42c037b1 Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Tue, 18 Oct 2022 12:14:37 -0700 Subject: [PATCH] Allow missing caches by default --- src/libstore/build/substitution-goal.cc | 16 +++++----------- src/libstore/http-binary-cache-store.cc | 2 +- src/libstore/local-store.cc | 5 +---- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/libstore/build/substitution-goal.cc b/src/libstore/build/substitution-goal.cc index 2af105b4d31..8fa8baf14de 100644 --- a/src/libstore/build/substitution-goal.cc +++ b/src/libstore/build/substitution-goal.cc @@ -110,18 +110,12 @@ void PathSubstitutionGoal::tryNext() tryNext(); return; } catch (SubstituterDisabled &) { - if (settings.tryFallback) { - tryNext(); - return; - } - throw; + tryNext(); + return; } catch (Error & e) { - if (settings.tryFallback) { - logError(e.info()); - tryNext(); - return; - } - throw; + logError(e.info()); + tryNext(); + return; } if (info->path != storePath) { diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc index 1479822a9f7..b3cad03f17d 100644 --- a/src/libstore/http-binary-cache-store.cc +++ b/src/libstore/http-binary-cache-store.cc @@ -82,7 +82,7 @@ class HttpBinaryCacheStore : public virtual HttpBinaryCacheStoreConfig, public v void maybeDisable() { auto state(_state.lock()); - if (state->enabled && settings.tryFallback) { + if (state->enabled) { int t = 60; printError("disabling binary cache '%s' for %s seconds", getUri(), t); state->enabled = false; diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index c9a466ee8c8..bafd74163ea 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1158,10 +1158,7 @@ void LocalStore::querySubstitutablePathInfos(const StorePathCAMap & paths, Subst } catch (InvalidPath &) { } catch (SubstituterDisabled &) { } catch (Error & e) { - if (settings.tryFallback) - logError(e.info()); - else - throw; + logError(e.info()); } } }