[pacman-dev] [PATCH] libalpm: Log URLs when retrying
Vladimir Panteleev
archlinux at cy.md
Thu Sep 9 08:41:22 UTC 2021
Allow finding which mirror was used to fetch a file.
This makes it a bit easier to debug situations in which mirrors serve
bad files with HTTP 200.
Signed-off-by: Vladimir Panteleev <archlinux at cy.md>
---
lib/libalpm/dload.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 4322318b..022bc7fd 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -427,6 +427,9 @@ static int curl_retry_next_server(CURLM *curlm, CURL *curl, struct dload_payload
len = strlen(server) + strlen(payload->filepath) + 2;
MALLOC(payload->fileurl, len, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
snprintf(payload->fileurl, len, "%s/%s", server, payload->filepath);
+ _alpm_log(handle, ALPM_LOG_DEBUG,
+ "%s: retrying from %s\n",
+ payload->remote_name, payload->fileurl);
fflush(payload->localf);
--
2.33.0
More information about the pacman-dev
mailing list