From: ludo@gnu.org (Ludovic Courtès)
To: Cyril Roelandt <tipecaml@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCHv2] lint: add 'source' checker.
Date: Thu, 15 Jan 2015 22:58:34 +0100 [thread overview]
Message-ID: <87ppaf3dv9.fsf@gnu.org> (raw)
In-Reply-To: <1421308365-15655-1-git-send-email-tipecaml@gmail.com> (Cyril Roelandt's message of "Thu, 15 Jan 2015 08:52:45 +0100")
Cyril Roelandt <tipecaml@gmail.com> skribis:
> * guix/scripts/lint.scm (validate-uri?): New procedure.
> (%checkers): Add 'home-page' checker
^^^^^
Typo.
> +(define (check-source package)
> + "Emit a warning if PACKAGE has an invalid 'source' field, or if that
> +'source' is not reachable."
> + (let ((origin (package-source package)))
> + (when (and origin
> + (eqv? (origin-method origin) url-fetch))
> + (let* ((strings (origin-uri origin))
> + (uris (if (list? strings)
> + (map string->uri strings)
> + (list (string->uri strings)))))
> + (for-each
> + (match-lambda
> + ((? uri? uri)
> + (validate-uri uri package 'source))
> + (_ (error "internal linter error")))
Just:
(for-each (cut validate-uri <> package 'source) ...)
> + (concatenate (map (lambda (uri)
> + (maybe-expand-mirrors uri %mirrors))
> + uris)))))))
Here:
(append-map (cut maybe-expand-mirrors <> %mirrors) uris)
OK to push with these changes, thank you!
The next step is to improve ‘probe-uri’ to handle FTP.
Ludo’.
next prev parent reply other threads:[~2015-01-15 21:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-28 17:02 New home-page checker for ‘guix lint’ Ludovic Courtès
2014-12-29 3:08 ` Cyril Roelandt
2014-12-29 3:40 ` [PATCH] lint: add 'source' checker Cyril Roelandt
2014-12-29 13:05 ` David Thompson
2014-12-29 14:23 ` Ludovic Courtès
2015-01-03 2:43 ` Cyril Roelandt
2015-01-03 19:11 ` Ludovic Courtès
2014-12-29 20:32 ` Ludovic Courtès
2015-01-15 7:52 ` [PATCHv2] " Cyril Roelandt
2015-01-15 21:58 ` Ludovic Courtès [this message]
2015-01-23 9:56 ` Ludovic Courtès
2015-01-25 17:43 ` Cyril Roelandt
2014-12-29 14:18 ` New home-page checker for ‘guix lint’ Ludovic Courtès
2014-12-29 20:27 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ppaf3dv9.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=tipecaml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.