unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexandru-Sergiu Marton <brown121407@posteo.ro>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: 42504@debbugs.gnu.org
Subject: bug#42504: guix refresh --update fails for Rust packages
Date: Fri, 24 Jul 2020 14:08:45 +0300	[thread overview]
Message-ID: <87ft9h1876.fsf@posteo.ro> (raw)
In-Reply-To: <20200724112330.4891eb0a@scratchpost.org> (Danny Milosavljevic's message of "Fri, 24 Jul 2020 11:23:30 +0200")

Danny Milosavljevic <dannym@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




  reply	other threads:[~2020-07-24 11:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24  7:16 bug#42504: guix refresh --update fails for Rust packages Alexandru-Sergiu Marton
2020-07-24  9:23 ` Danny Milosavljevic
2020-07-24 11:08   ` Alexandru-Sergiu Marton [this message]
2020-07-27 11:36     ` Danny Milosavljevic

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ft9h1876.fsf@posteo.ro \
    --to=brown121407@posteo.ro \
    --cc=42504@debbugs.gnu.org \
    --cc=dannym@scratchpost.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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).