GNU bug report logs - #36734
‘guix lint -c source’ treats redirects as warnings

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Fri, 19 Jul 2019 23:38:02 UTC

Severity: normal

To reply to this bug, email your comments to 36734 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#36734; Package guix. (Fri, 19 Jul 2019 23:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 19 Jul 2019 23:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: Bug Guix <bug-guix <at> gnu.org>
Subject: ‘guix lint -c source’
 treats redirects as warnings
Date: Sat, 20 Jul 2019 01:37:29 +0200
Hello!

I noticed that ‘guix lint -c source’ would incorrectly treat redirects
as errors:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix lint -c source iml
gnu/packages/algebra.scm:1508:5: warning: iml <at> 1.0.5: all the source URIs are unreachable:
gnu/packages/algebra.scm:1508:5: warning: iml <at> 1.0.5: permanent redirect from http://www.cs.uwaterloo.ca/~astorjoh/iml-1.0.5.tar.bz2 to https://cs.uwaterloo.ca/~astorjoh/iml-1.0.5.tar.bz2
--8<---------------cut here---------------end--------------->8---

This is because ‘validate-uri’ returns a warning for redirects, whereas
before commit 50fc2384feb3bb2677d074f8f0deb5ae3c56b4d8 the code did:

    ((= 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, ‘validate-uri’ would return true *and* emit a warning as a side effect.

I’m not sure how to achieve the same result now.

Thoughts?

Thanks,
Ludo’.




This bug report was last modified 5 years and 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.