From: Eric Bavier <ericbavier@openmailbox.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] guix: lint: Check for version-only origin file names.
Date: Mon, 14 Sep 2015 18:11:37 -0500 [thread overview]
Message-ID: <20150914181137.33e4e4b8@openmailbox.org> (raw)
In-Reply-To: <87egi26yra.fsf@gnu.org>
On Sun, 13 Sep 2015 18:59:53 +0200
ludo@gnu.org (Ludovic Courtès) wrote:
> Eric Bavier <ericbavier@openmailbox.org> skribis:
>
> > From 8db3e5978394b99ad14d69494b00343b70f918e1 Mon Sep 17 00:00:00 2001
> > From: Eric Bavier <bavier@member.fsf.org>
> > Date: Thu, 10 Sep 2015 15:39:44 -0500
> > Subject: [PATCH 1/2] guix: packages: Add origin-actual-file-name.
> >
> > * guix/scripts/graph.scm (uri->file-name, node-full-name): Move origin file
> > name logic to...
> > * guix/packages.scm (origin-actual-file-name): ...here.
>
> LGTM, but could you add a couple of tests (say one with a ‘file-name’
> field and one without) in tests/packages.scm?
Done.
>
> > From 03c3f2b21a2467675092830aea2ddf192e133ff5 Mon Sep 17 00:00:00 2001
> > From: Eric Bavier <bavier@member.fsf.org>
> > Date: Thu, 10 Sep 2015 15:34:58 -0500
> > Subject: [PATCH 2/2] guix: lint: Check for meaningful origin file names.
> >
> > * guix/scripts/lint.scm (check-source-file-name): New procedure.
> > (%checkers): Add 'source-file-name' checker.
> > * tests/lint.scm ("source: file name", "source: file name v")
> > ("source: file name valid", "source: file name bad checkout")
> > ("source: file name good checkout"): New tests.
> > * doc/guix.texi (Invoking guix lint): Mention file name check.
>
> [...]
>
> > - (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)))))
> > -
> > - ;; Just make sure that at least one of the URIs is valid.
> > - (call-with-values
> > - (lambda () (try-uris uris))
> > - (lambda (success? warnings)
> > - ;; When everything fails, report all of WARNINGS, otherwise don't
> > - ;; report anything.
> > - ;;
> > - ;; XXX: Ideally we'd still allow warnings to be raised if *some*
> > - ;; URIs are unreachable, but distinguish that from the error case
> > - ;; where *all* the URIs are unreachable.
> > - (unless success?
> > - (emit-warning package
> > - (_ "all the source URIs are unreachable:")
> > - 'source)
> > - (for-each (lambda (warning)
> > - (display warning (guix-warning-port)))
> > - (reverse warnings)))))))))
> > + (when origin
> > + (if (eqv? (origin-method origin) url-fetch)
> > + (let* ((strings (origin-uri origin))
> > + (uris (if (list? strings)
>
> I think this hunk should be omitted, no?
Correct. Thanks for catching it.
>
> > +(test-assert "source: file name"
>
> s/source:/source-file-name:/ for consistency.
>
> OK with these changes.
Pushed as 50f5c46 and 3b4d010.
`~Eric
prev parent reply other threads:[~2015-09-15 4:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-23 23:05 [PATCH] guix: lint: Check for version-only origin file names ericbavier
2015-08-24 23:02 ` Mark H Weaver
2015-08-25 0:10 ` Eric Bavier
2015-08-28 7:48 ` Ludovic Courtès
2015-09-10 20:50 ` Eric Bavier
2015-09-11 4:04 ` Eric Bavier
2015-09-13 16:59 ` Ludovic Courtès
2015-09-14 23:11 ` Eric Bavier [this message]
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=20150914181137.33e4e4b8@openmailbox.org \
--to=ericbavier@openmailbox.org \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/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.