diff --git a/src/libstore/local-overlay-store.hh b/src/libstore/local-overlay-store.hh index ac730c77c..060ca37c3 100644 --- a/src/libstore/local-overlay-store.hh +++ b/src/libstore/local-overlay-store.hh @@ -90,15 +90,18 @@ public: LocalOverlayStore(std::string scheme, std::string path, const Params & params) : LocalOverlayStore(params) { - throw UnimplementedError("LocalOverlayStore"); + if (!path.empty()) + throw UsageError("local-overlay:// store url doesn't support path part, only scheme and query params"); } static std::set uriSchemes() - { return {}; } + { + return { "local-overlay" }; + } std::string getUri() override { - return "local-overlay"; + return "local-overlay://"; } private: diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 55cdd71a9..069fad420 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -11,7 +11,6 @@ #include "archive.hh" #include "callback.hh" #include "remote-store.hh" -#include "local-overlay-store.hh" // FIXME this should not be here, see TODO below on // `addMultipleToStore`. #include "worker-protocol.hh" @@ -1456,10 +1455,6 @@ std::shared_ptr openFromNonUri(const std::string & uri, const Store::Para return std::make_shared(params); } else if (uri == "local") { return std::make_shared(params); - } else if (uri == "local-overlay") { - auto store = std::make_shared(params); - experimentalFeatureSettings.require(store->experimentalFeature()); - return store; } else if (isNonUriPath(uri)) { Store::Params params2 = params; params2["root"] = absPath(uri); diff --git a/tests/functional/local-overlay-store/bad-uris.sh b/tests/functional/local-overlay-store/bad-uris.sh index 462bf27eb..07b2c6f28 100644 --- a/tests/functional/local-overlay-store/bad-uris.sh +++ b/tests/functional/local-overlay-store/bad-uris.sh @@ -6,9 +6,9 @@ storeDirs mkdir -p $TEST_ROOT/bad_test badTestRoot=$TEST_ROOT/bad_test -storeBadRoot="local-overlay?root=$badTestRoot&lower-store=$storeA&upper-layer=$storeBTop" -storeBadLower="local-overlay?root=$storeBRoot&lower-store=$badTestRoot&upper-layer=$storeBTop" -storeBadUpper="local-overlay?root=$storeBRoot&lower-store=$storeA&upper-layer=$badTestRoot" +storeBadRoot="local-overlay://?root=$badTestRoot&lower-store=$storeA&upper-layer=$storeBTop" +storeBadLower="local-overlay://?root=$storeBRoot&lower-store=$badTestRoot&upper-layer=$storeBTop" +storeBadUpper="local-overlay://?root=$storeBRoot&lower-store=$storeA&upper-layer=$badTestRoot" declare -a storesBad=( "$storeBadRoot" "$storeBadLower" "$storeBadUpper" diff --git a/tests/functional/local-overlay-store/common.sh b/tests/functional/local-overlay-store/common.sh index 2d614b140..bd144c925 100644 --- a/tests/functional/local-overlay-store/common.sh +++ b/tests/functional/local-overlay-store/common.sh @@ -29,7 +29,7 @@ storeDirs () { storeA="$storeVolume/store-a" storeBTop="$storeVolume/store-b" storeBRoot="$storeVolume/merged-store" - storeB="local-overlay?root=$storeBRoot&lower-store=$storeA&upper-layer=$storeBTop" + storeB="local-overlay://?root=$storeBRoot&lower-store=$storeA&upper-layer=$storeBTop" # Creating testing directories mkdir -p "$storeVolume"/{store-a/nix/store,store-b,merged-store/nix/store,workdir} }