David Craven <da...@craven.ch> 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’.

Reply via email to