From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:42863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h41gq-0006hg-5Q for guix-patches@gnu.org; Wed, 13 Mar 2019 07:04:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h41RX-0000Y7-2T for guix-patches@gnu.org; Wed, 13 Mar 2019 06:49:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h41RW-0000Xy-UW for guix-patches@gnu.org; Wed, 13 Mar 2019 06:49:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h41RW-0002Qm-Se for guix-patches@gnu.org; Wed, 13 Mar 2019 06:49:02 -0400 Subject: [bug#34838] [PATCH 6/6] guix build: '--with-branch' strips slashes from the version string. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 13 Mar 2019 11:47:51 +0100 Message-Id: <20190313104751.20758-6-ludo@gnu.org> In-Reply-To: <20190313104751.20758-1-ludo@gnu.org> References: <20190313104751.20758-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 34838@debbugs.gnu.org This fixes things like: guix build glibc \ --with-git-url=glibc=git://sourceware.org/git/glibc.git \ --with-branch=glibc=release/2.25/master whereby slashes would before go straight to the 'version' field, leading to an invalid store file name. * guix/scripts/build.scm (transform-package-source-branch)[replace]: Replace slashes with hyphens in BRANCH when building the version string. --- guix/scripts/build.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 20929d6110..28864435df 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -318,7 +318,10 @@ strings like \"guile-next=stable-3.0\" meaning that packages are built using (define (replace old url branch) (package (inherit old) - (version (string-append "git." branch)) + (version (string-append "git." (string-map (match-lambda + (#\/ #\-) + (chr chr)) + branch))) (source (git-checkout (url url) (branch branch) (recursive? #t))))) -- 2.21.0