From 1326a40144954d36792b1fd32d2f19a3f5429015 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 7 Jun 2021 09:39:42 +0200 Subject: add info about caveat with pacman's server error limit ... also reported in #10. --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 11cbeb2..a2b4cba 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,34 @@ make sure you really do have the latest files run `pacman -Syu` *twice*. To get a better idea what happens in the background have a look at [the request flow chart](FLOW.md). +Current caveat +-------------- + +With its latest release `pacman` now supports a *server error limit*: Three +download errors from a server results in the server being skipped for the +remainder of this transaction. +However `pacredir` sends a "*404 - not found*" response if the file is not +available in local network - and is skipped after just three misses. + +This new feature is not configurable at runtime, so rebuilding `pacman` with +this patch is the only way to make things work with `pacredir`. + + --- a/lib/libalpm/dload.c + +++ b/lib/libalpm/dload.c + @@ -60,7 +60,7 @@ static int curl_gethost(const char *url, char *buffer, size_t buf_len); + + /* number of "soft" errors required to blacklist a server, set to 0 to disable + * server blacklisting */ + -const unsigned int server_error_limit = 3; + +const unsigned int server_error_limit = 0; + + struct server_error_count { + char server[HOSTNAME_SIZE]; + +Let's hope +[FS#23407 - Allow soft failures on Server URLs](https://bugs.archlinux.org/task/23407) +is implemented any time soon. + Security -------- -- cgit v1.2.3-70-g09d2