From patchwork Thu Sep 9 08:41:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Panteleev X-Patchwork-Id: 1965 Return-Path: Delivered-To: patchwork@archlinux.org Received: from mail.archlinux.org [95.216.189.61] by patchwork.archlinux.org with IMAP (fetchmail-6.4.21) for (single-drop); Thu, 09 Sep 2021 08:52:04 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id KE/qOTPLOWHvMwYAK+/4rw (envelope-from ) for ; Thu, 09 Sep 2021 08:52:03 +0000 Received: from lists.archlinux.org (lists.archlinux.org [IPv6:2a01:4f9:c010:9eb4::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id C129F8E2B2F; Thu, 9 Sep 2021 08:52:02 +0000 (UTC) Received: from lists.archlinux.org (localhost [IPv6:::1]) by lists.archlinux.org (Postfix) with ESMTP id A8F5B7EDC7E; Thu, 9 Sep 2021 08:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.archlinux.org; s=dkim-rsa; t=1631177522; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LVP14LQ2KAlWMJ3XhoOfBXMwSY9EcSQaHcsAxzzajeQ=; b=qgi6M6s91AvomEtn8921o9sUMqB8Cmuv0oQ1ju2NV1bG3Lac4msLYywzPSqCPX6Nd1Fm+e 3yZA6DfaZ/P4BCnY/2nhZeHfiUcZRR8ay++zcVxmGcrRE8Ft8I4UHS88R/sJ5NlGCqeO28 v+Kw1LiaX3bK6Lw3e/ZOgptve3rEtJZBYZn7p1+ys8OQpk0aVse63mepLr6v6SlQxU2+f4 M7cNnPWaiLWut+m4ibp6NLnCPPzXYMVVHtbMYvH3t3BFqj21agToY4a07y6WfbB51hujw+ Dym639Fx2bctJcPrdUpBeo4Q6r3xPH0oGycZ99XYYXH+bG2B905Hio01u5m/xr17/bLpa+ BE3TD6PRkR0oQIxo+O3wmn1PXwE6saTLhoMP863YgODssRJ4KYVM5yYowa4oRYngg3OLco zBSerOypr/3zJJupADIN05Fw3SHJ9Cp95ut6OuDoOEuPBwl/vZ3zb0JIdnkwNn1pgYEO/Q UgMLFXgL+2XJYeBtKQc82gCaqO/Wcz5V7L73lI6FfFbDaJKEV8wyrTmRXiqKU0C4YWnFgq EK81gx72vmhQjwQngvvpfVws61mLOhGpLYbH2UHtHWt028tEgUSbOfHSDldH4Cdw1e+Con C68lL44vXWSGc8x/KO5MTNiMUomrR9DrFcYtATiGW+Anlf2g+2EvI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=lists.archlinux.org; s=dkim-ed25519; t=1631177522; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LVP14LQ2KAlWMJ3XhoOfBXMwSY9EcSQaHcsAxzzajeQ=; b=zD8/9bwSu6i1gH+YMr8SSa8eo2Zk/H5ZGFLrnmlGHbXSY8fX63C1d1LeFL747OgOFTY5iY Uh/kPBdPYKyFz2Dg== X-Original-To: pacman-dev@lists.archlinux.org Delivered-To: pacman-dev@lists.archlinux.org Received: from home.thecybershadow.net (f1.1azy.net [104.244.74.192]) by lists.archlinux.org (Postfix) with ESMTPS id 038747EDC6E for ; Thu, 9 Sep 2021 08:52:00 +0000 (UTC) Received: from vladimir by home.thecybershadow.net with local (Exim 4.94.2) (envelope-from ) id 1mOFmo-004IBf-UH; Thu, 09 Sep 2021 08:51:58 +0000 To: pacman-dev@lists.archlinux.org Date: Thu, 9 Sep 2021 08:41:22 +0000 Message-Id: <20210909084122.1020752-1-archlinux@cy.md> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Subject: [pacman-dev] [PATCH] libalpm: Log URLs when retrying X-BeenThere: pacman-dev@lists.archlinux.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Vladimir Panteleev via pacman-dev From: Vladimir Panteleev Reply-To: Discussion list for pacman development Cc: Vladimir Panteleev Errors-To: pacman-dev-bounces@lists.archlinux.org Sender: "pacman-dev" Authentication-Results: mail.archlinux.org; dkim=pass header.d=lists.archlinux.org header.s=dkim-rsa header.b=qgi6M6s9; dkim=pass header.d=lists.archlinux.org header.s=dkim-ed25519 header.b="zD8/9bwS"; dmarc=pass (policy=none) header.from=archlinux.org; spf=pass (mail.archlinux.org: domain of pacman-dev-bounces@lists.archlinux.org designates 2a01:4f9:c010:9eb4::1 as permitted sender) smtp.mailfrom=pacman-dev-bounces@lists.archlinux.org X-Rspamd-Queue-Id: C129F8E2B2F X-Spamd-Result: default: False [-3.41 / 15.00]; DWL_DNSWL_MED(-2.00)[archlinux.org:dkim]; DMARC_POLICY_ALLOW(-0.50)[archlinux.org,none]; R_MISSING_CHARSET(0.50)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCVD_IN_DNSWL_MED(-0.20)[2a01:4f9:c010:9eb4::1:from]; MAILLIST(-0.20)[mailman]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f9:c010:9eb4::1:c]; R_DKIM_ALLOW(-0.20)[lists.archlinux.org:s=dkim-rsa,lists.archlinux.org:s=dkim-ed25519]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[pacman-dev@lists.archlinux.org]; FROM_NEQ_ENVFROM(0.00)[pacman-dev@lists.archlinux.org,pacman-dev-bounces@lists.archlinux.org]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[pacman-dev@lists.archlinux.org]; ASN(0.00)[asn:24940, ipnet:2a01:4f9::/32, country:DE]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[lists.archlinux.org:+]; NEURAL_HAM(-0.00)[-1.000]; FORGED_SENDER_MAILLIST(0.00)[] X-Rspamd-Server: mail.archlinux.org 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 --- 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);