diff options
author | Shea Levy <shea@shealevy.com> | 2014-02-07T21·17-0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2014-02-08T05·13-0500 |
commit | 73874629ef59dc3b237a2c316179e722f971bb5e (patch) | |
tree | b8280e43b84d54a227ef3e995b13c3a6f1269d1b /src | |
parent | 188f96500bc16891b22c684ad96122635667a8ff (diff) |
nix-store --serve: Use dump instead of export
Also remove signing support Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/store-api.cc | 5 | ||||
-rw-r--r-- | src/libstore/store-api.hh | 2 | ||||
-rw-r--r-- | src/nix-store/nix-store.cc | 12 |
3 files changed, 7 insertions, 12 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 082c2c4d9740..bd95590756de 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -1,6 +1,7 @@ #include "store-api.hh" #include "globals.hh" #include "util.hh" +#include "archive.hh" #include <climits> @@ -258,7 +259,7 @@ string StoreAPI::makeValidityRegistration(const PathSet & paths, } -void StoreAPI::serve(Source & in, Sink & out, bool sign) +void StoreAPI::serve(Source & in, Sink & out) { string cmd = readString(in); if (cmd == "query") { @@ -284,7 +285,7 @@ void StoreAPI::serve(Source & in, Sink & out, bool sign) throw Error(format("Unknown serve query `%1%'") % cmd); } } else if (cmd == "substitute") - exportPath(readString(in), sign, out); + dumpPath(readString(in), out); else throw Error(format("Unknown serve command `%1%'") % cmd); } diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 57cf5179485c..edab6ea5a2d9 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -251,7 +251,7 @@ public: /* Serve the store for ssh substituters by taking commands * from in and printing results to out */ - void serve(Source & in, Sink & out, bool sign); + void serve(Source & in, Sink & out); }; diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index fb1d3f541dec..e3f27820fffd 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -837,18 +837,12 @@ static void opClearFailedPaths(Strings opFlags, Strings opArgs) // Serve the nix store in a way usable by a restricted ssh user static void opServe(Strings opFlags, Strings opArgs) { - if (!opArgs.empty()) - throw UsageError("no arguments expected"); - // Could eventually take a username argument? - bool sign; - foreach (Strings::iterator, i, opFlags) - if (*i == "--sign") sign = true; - else throw UsageError(format("unknown flag `%1%'") % *i); - + if (!opArgs.empty() || !opFlags.empty()) + throw UsageError("no arguments or flags expected"); FdSource in(STDIN_FILENO); FdSink out(STDOUT_FILENO); - store->serve(in, out, sign); + store->serve(in, out); } |