unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36734: ‘guix lint -c source’ treats redirects as warnings
@ 2019-07-19 23:37 Ludovic Courtès
  0 siblings, 0 replies; only message in thread
From: Ludovic Courtès @ 2019-07-19 23:37 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 36734

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@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
--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’.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-19 23:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 23:37 bug#36734: ‘guix lint -c source’ treats redirects as warnings Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).