Get rid of downloadCached()

Everything uses the generic caching system now.
This commit is contained in:
Eelco Dolstra
2020-03-18 17:24:19 +01:00
parent c5ec95e2c7
commit f6ddf48882
9 changed files with 113 additions and 260 deletions
+3 -3
View File
@@ -545,6 +545,7 @@ formal
#include "eval.hh"
#include "download.hh"
#include "fetchers/fetchers.hh"
#include "store-api.hh"
@@ -687,9 +688,8 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(const SearchPathEl
if (isUri(elem.second)) {
try {
CachedDownloadRequest request(elem.second);
request.unpack = true;
res = { true, getDownloader()->downloadCached(store, request).path };
res = { true, store->toRealPath(fetchers::downloadTarball(
store, resolveUri(elem.second), "source", false).storePath) };
} catch (DownloadError & e) {
printError(format("warning: Nix search path entry '%1%' cannot be downloaded, ignoring") % elem.second);
res = { false, "" };