[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/12] import: crate: Add crate updater.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH 07/12] import: crate: Add crate updater. |
Date: |
Mon, 26 Sep 2016 12:09:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
David Craven <address@hidden> skribis:
> * guix/import/crate.scm (crate-package?, latest-release,
> %crate-updater): New variables.
> * guix/scripts/refresh.scm (%updaters): Add %crate-updater to list of
> updaters.
> * guix/upstream.scm (package-update): Use a url from the list when the
> find2 procedure doesn't find a url sig-url pair.
Neat!
> +(define (latest-release package)
> + "Return an <upstream-source> for the latest release of PACKAGE."
> + (let* ((crate-name (guix-package->crate-name package))
> + (metadata (crate-fetch crate-name))
> + (version (assoc-ref* metadata "crate" "max_version"))
> + (url (crate-uri crate-name version)))
> + (upstream-source
> + (package (package-name package))
> + (version version)
> + (urls (list url)))))
So they don’t publish OpenPGP signatures? :-/
> --- a/guix/upstream.scm
> +++ b/guix/upstream.scm
> @@ -194,7 +194,7 @@ and 'interactive' (default)."
> (string-suffix? archive-type url))
> urls
> (or signature-urls (circular-list #f)))))
> - (let ((tarball (download-tarball store url signature-url
> + (let ((tarball (download-tarball store (if url url (car urls))
> signature-url
I don’t understand this part, and I suspect it could lead to
inconsistent results where the signature URL doesn’t match the source
URL.
Do you have an example of the problem you experienced? Since the
problem is probably not specific to Crates, we should probably address
it in a separate patch.
Otherwise LGTM!
Thanks,
Ludo’.
- [PATCH 01/12] import: Move json-fetch to (guix import utils)., David Craven, 2016/09/22
- [PATCH 03/12] import: Move string->license to importers., David Craven, 2016/09/22
- [PATCH 02/12] import: Reorder imports in (guix import utils)., David Craven, 2016/09/22
- [PATCH 05/12] import: utils: Refactor license->symbol., David Craven, 2016/09/22
- [PATCH 11/12] gnu: Add cargo-bootstrap., David Craven, 2016/09/22
- [PATCH 07/12] import: crate: Add crate updater., David Craven, 2016/09/22
- Re: [PATCH 07/12] import: crate: Add crate updater.,
Ludovic Courtès <=
- [PATCH 09/12] gnu: Add rust-bootstrap-x86_64-1.12.0., David Craven, 2016/09/22
- [PATCH 12/12] gnu: Add rust helper functions., David Craven, 2016/09/22
- [PATCH 06/12] import: Add importer for rust crates., David Craven, 2016/09/22
- [PATCH 04/12] import: utils: Add spdx-string->license., David Craven, 2016/09/22