From unknown Thu Jun 12 08:42:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36734: =?UTF-8?Q?=E2=80=98guix?= lint -c =?UTF-8?Q?source=E2=80=99?= treats redirects as warnings Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 19 Jul 2019 23:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36734 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Christopher Baines Cc: 36734@debbugs.gnu.org X-Debbugs-Original-Cc: Bug Guix Received: via spool by submit@debbugs.gnu.org id=B.15635794588354 (code B ref -1); Fri, 19 Jul 2019 23:38:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jul 2019 23:37:38 +0000 Received: from localhost ([127.0.0.1]:56648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hocRV-0002Af-Nv for submit@debbugs.gnu.org; Fri, 19 Jul 2019 19:37:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:48138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hocRT-0002AX-Ft for submit@debbugs.gnu.org; Fri, 19 Jul 2019 19:37:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55194) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hocRS-0002rK-Gv for bug-guix@gnu.org; Fri, 19 Jul 2019 19:37:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hocRR-0001O8-MR; Fri, 19 Jul 2019 19:37:33 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40692 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hocRP-0002Lv-Ut; Fri, 19 Jul 2019 19:37:33 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 2 Thermidor an 227 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 20 Jul 2019 01:37:29 +0200 Message-ID: <871ryla952.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! I noticed that =E2=80=98guix lint -c source=E2=80=99 would incorrectly trea= t redirects as errors: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix lint -c source iml gnu/packages/algebra.scm:1508:5: warning: iml@1.0.5: all the source URIs ar= e unreachable: gnu/packages/algebra.scm:1508:5: warning: iml@1.0.5: permanent redirect fro= m http://www.cs.uwaterloo.ca/~astorjoh/iml-1.0.5.tar.bz2 to https://cs.uwat= erloo.ca/~astorjoh/iml-1.0.5.tar.bz2 --8<---------------cut here---------------end--------------->8--- This is because =E2=80=98validate-uri=E2=80=99 returns a warning for redire= cts, whereas before commit 50fc2384feb3bb2677d074f8f0deb5ae3c56b4d8 the code did: ((=3D 301 (response-code argument)) (if (response-location argument) (begin (emit-warning package (format #f (G_ "permanent redirect from ~a to ~a") (uri->string uri) (uri->string (response-location argument)))) #t) (begin (emit-warning package (format #f (G_ "invalid permanent redirect \ from ~a") (uri->string uri))) #f))) IOW, =E2=80=98validate-uri=E2=80=99 would return true *and* emit a warning = as a side effect. I=E2=80=99m not sure how to achieve the same result now. Thoughts? Thanks, Ludo=E2=80=99.