From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:60279) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2WIl-00027h-Vk for guix-patches@gnu.org; Tue, 27 Aug 2019 03:54:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2WIk-0004oq-UM for guix-patches@gnu.org; Tue, 27 Aug 2019 03:54:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38798) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2WIk-0004oi-Jp for guix-patches@gnu.org; Tue, 27 Aug 2019 03:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i2WIk-000578-F9 for guix-patches@gnu.org; Tue, 27 Aug 2019 03:54:02 -0400 Subject: [bug#36976] [PATCH 1/1] download: Map file-name characters not allowed in store. Resent-Message-ID: References: <20190808144448.25147-1-h.goebel@crazy-compilers.com> <874l271tf6.fsf@gnu.org> From: Hartmut Goebel Message-ID: Date: Tue, 27 Aug 2019 09:53:08 +0200 MIME-Version: 1.0 In-Reply-To: <874l271tf6.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 36976@debbugs.gnu.org Hi, 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). -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |