GNU bug report logs - #36976
[PATCH 1/1] download: Map file-name characters not allowed in store.

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Thu, 8 Aug 2019 14:46:02 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

Full log


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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: 36976 <at> debbugs.gnu.org
Subject: Re: [bug#36976] [PATCH 1/1] download: Map file-name characters not
 allowed in store.
Date: Sun, 01 Sep 2019 21:39:39 +0200
Hello,

Hartmut Goebel <h.goebel <at> crazy-compilers.com> skribis:

> Thanks for the review and the coding suggestions..
>
> Am 23.08.19 um 23:08 schrieb Ludovic Courtès:
>>> * guix/download.scm (safe-name): New function.
>>>   (download-to-store): NAME defaults to the "safe" basename of URL.
>> What about moving this automatic renaming feature to (guix scripts
>> download)?  I’d rather not do it in the core APIs.
> `download-to-store store` was defined as:
>
>    (define* (download-to-store store url #:optional (name (basename url)) …
>
> When developing this patch, I decided to put it into the core since
> users of this function would expect to be allowed to just pass any url
> and don't need to take care about valid characters. If not doing the
> automatic renaming here, users would need to perform the conversion
> prior to calling this function in any case (except when 100% sure only
> valid characters are used).

Yes, but that’s OK to me: IMO, procedures have to focused on one thing;
users can perform additional processing beforehand if they need it.

Conversely, commands have to do the right thing by default, which is why
I agree that ‘guix download’ should rename automatically when needed.

How does that sound?

Ludo’.




This bug report was last modified 5 years and 242 days ago.

Previous Next


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