mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
Use local-overlay://
not local-overlay
for store URL
This is a bit uglier, but allows us to avoid an ad-hoc special case in `store-api.cc`.
This commit is contained in:
parent
8434f23c97
commit
250c3541bb
4 changed files with 10 additions and 12 deletions
|
@ -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<std::string> uriSchemes()
|
||||
{ return {}; }
|
||||
{
|
||||
return { "local-overlay" };
|
||||
}
|
||||
|
||||
std::string getUri() override
|
||||
{
|
||||
return "local-overlay";
|
||||
return "local-overlay://";
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -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<Store> openFromNonUri(const std::string & uri, const Store::Para
|
|||
return std::make_shared<UDSRemoteStore>(params);
|
||||
} else if (uri == "local") {
|
||||
return std::make_shared<LocalStore>(params);
|
||||
} else if (uri == "local-overlay") {
|
||||
auto store = std::make_shared<LocalOverlayStore>(params);
|
||||
experimentalFeatureSettings.require(store->experimentalFeature());
|
||||
return store;
|
||||
} else if (isNonUriPath(uri)) {
|
||||
Store::Params params2 = params;
|
||||
params2["root"] = absPath(uri);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue