‘guix lint -c source’ treats redirects as warnings

  • Open
  • quality assurance status badge
Details
One participant
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 20 Jul 2019 01:37
(name . Christopher Baines)(address . mail@cbaines.net)(name . Bug Guix)(address . bug-guix@gnu.org)
871ryla952.fsf@gnu.org
Hello!

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

Toggle snippet (5 lines)
$ ./pre-inst-env guix lint -c source iml
gnu/packages/algebra.scm:1508:5: warning: iml@1.0.5: all the source URIs are unreachable:
gnu/packages/algebra.scm:1508:5: warning: iml@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

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’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 36734@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 36734
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch