From bcc9943cee4d4f62e0bceb4245d390fb60744eae Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 26 Feb 2016 15:20:10 +0100 Subject: importPaths(): Optionally add NARs to binary cache accessor This enables an optimisation in hydra-queue-runner, preventing a download of a NAR it just uploaded to the cache when reading files like hydra-build-products. --- src/nix-store/nix-store.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nix-store') diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 48c2865e5ecc..a258c77c326f 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -732,7 +732,7 @@ static void opImport(Strings opFlags, Strings opArgs) if (!opArgs.empty()) throw UsageError("no arguments expected"); FdSource source(STDIN_FILENO); - Paths paths = store->importPaths(requireSignature, source); + Paths paths = store->importPaths(requireSignature, source, 0); for (auto & i : paths) cout << format("%1%\n") % i << std::flush; @@ -935,7 +935,7 @@ static void opServe(Strings opFlags, Strings opArgs) case cmdImportPaths: { if (!writeAllowed) throw Error("importing paths is not allowed"); - store->importPaths(false, in); + store->importPaths(false, in, 0); out << 1; // indicate success break; } -- cgit 1.4.1