GNU bug report logs - #42504
guix refresh --update fails for Rust packages

Previous Next

Package: guix;

Reported by: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>

Date: Fri, 24 Jul 2020 07:17:02 UTC

Severity: normal

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 42504 <at> debbugs.gnu.org (full text, mbox):

From: Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 42504 <at> debbugs.gnu.org
Subject: Re: bug#42504: guix refresh --update fails for Rust packages
Date: Fri, 24 Jul 2020 14:08:45 +0300
Danny Milosavljevic <dannym <at> scratchpost.org> writes:
> And guix repl says:
>
> scheme@(guix-user)> ,use (guix utils)
> scheme@(guix-user)> (file-extension "https://crates.io/api/v1/crates/instant/0.1.2/download")
> $1 = #f
>
> But the case #f is not handled in the code above--which is why it doesn't work.
>
> Could you test the following fix?
>
> diff --git a/guix/upstream.scm b/guix/upstream.scm
> index 70cbfb45e8..31bd6faea4 100644
> --- a/guix/upstream.scm
> +++ b/guix/upstream.scm
> @@ -369,7 +369,7 @@ SOURCE, an <upstream-source>."
>       (let*-values (((archive-type)
>                      (match (and=> (package-source package) origin-uri)
>                        ((? string? uri)
> -                       (let ((type (file-extension (basename uri))))
> +                       (let ((type (or (file-extension (basename uri)) "")))
>                           ;; Sometimes we have URLs such as
>                           ;; "https://github.com/…/tarball/v0.1", in which case
>                           ;; we must not consider "1" as the extension.

This fixes the issue, thanks!

--
Sergiu




This bug report was last modified 4 years and 359 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.