aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikola Knezevic <nikola@knezevic.ch>2020-04-08 14:12:22 +0200
committerNikola Knezevic <nikola@knezevic.ch>2020-04-08 22:26:57 +0200
commit7867685dcdf1ba3c9290b777e0975ff0b775f667 (patch)
treec6c026d71418635613475779ccb112f3576fb7ca
parentf5095594e723d02c9bf22fe24ad838ebff4f9165 (diff)
after flake rebase
-rw-r--r--src/libexpr/parser.y2
-rw-r--r--src/libexpr/primops/fetchTree.cc2
-rw-r--r--src/libfetchers/github.cc2
-rw-r--r--src/libfetchers/tarball.cc10
-rwxr-xr-xsrc/nix-channel/nix-channel.cc2
5 files changed, 9 insertions, 9 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index 235ed5b1d..b33ab908b 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -690,7 +690,7 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(const SearchPathEl
try {
res = { true, store->toRealPath(fetchers::downloadTarball(
store, resolveUri(elem.second), "source", false).storePath) };
- } catch (DataTransferError & e) {
+ } catch (FileTransferError & e) {
printError(format("warning: Nix search path entry '%1%' cannot be downloaded, ignoring") % elem.second);
res = { false, "" };
}
diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc
index 9586f71ed..43c58485a 100644
--- a/src/libexpr/primops/fetchTree.cc
+++ b/src/libexpr/primops/fetchTree.cc
@@ -2,7 +2,7 @@
#include "eval-inline.hh"
#include "store-api.hh"
#include "fetchers.hh"
-#include "download.hh"
+#include "filetransfer.hh"
#include <ctime>
#include <iomanip>
diff --git a/src/libfetchers/github.cc b/src/libfetchers/github.cc
index ef27eaa76..8675a5a66 100644
--- a/src/libfetchers/github.cc
+++ b/src/libfetchers/github.cc
@@ -1,4 +1,4 @@
-#include "download.hh"
+#include "filetransfer.hh"
#include "cache.hh"
#include "fetchers.hh"
#include "globals.hh"
diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc
index 4c4e5828e..695525b31 100644
--- a/src/libfetchers/tarball.cc
+++ b/src/libfetchers/tarball.cc
@@ -1,6 +1,6 @@
#include "fetchers.hh"
#include "cache.hh"
-#include "download.hh"
+#include "filetransfer.hh"
#include "globals.hh"
#include "store-api.hh"
#include "archive.hh"
@@ -36,13 +36,13 @@ DownloadFileResult downloadFile(
if (cached && !cached->expired)
return useCached();
- DownloadRequest request(url);
+ FileTransferRequest request(url);
if (cached)
request.expectedETag = getStrAttr(cached->infoAttrs, "etag");
- DownloadResult res;
+ FileTransferResult res;
try {
- res = getDownloader()->download(request);
- } catch (DownloadError & e) {
+ res = getFileTransfer()->download(request);
+ } catch (FileTransferError & e) {
if (cached) {
warn("%s; using cached version", e.msg());
return useCached();
diff --git a/src/nix-channel/nix-channel.cc b/src/nix-channel/nix-channel.cc
index 7d584f891..abd390414 100755
--- a/src/nix-channel/nix-channel.cc
+++ b/src/nix-channel/nix-channel.cc
@@ -113,7 +113,7 @@ static void update(const StringSet & channelNames)
// Download the channel tarball.
try {
filename = store->toRealPath(fetchers::downloadFile(store, url + "/nixexprs.tar.xz", "nixexprs.tar.xz", false).storePath);
- } catch (DataTransferError & e) {
+ } catch (FileTransferError & e) {
filename = store->toRealPath(fetchers::downloadFile(store, url + "/nixexprs.tar.bz2", "nixexprs.tar.bz2", false).storePath);
}
}