From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#40039: 'wrap-script' introduces spurious argument Date: Thu, 12 Mar 2020 15:26:21 +0100 Message-ID: <87k13psl82.fsf@inria.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35224) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCOnf-0000rJ-AI for bug-guix@gnu.org; Thu, 12 Mar 2020 10:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCOne-0003FQ-8n for bug-guix@gnu.org; Thu, 12 Mar 2020 10:27:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51651) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jCOne-0003FJ-5S for bug-guix@gnu.org; Thu, 12 Mar 2020 10:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jCOne-0004Xn-2s for bug-guix@gnu.org; Thu, 12 Mar 2020 10:27:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:35145) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCOn5-0005XT-8N for bug-Guix@gnu.org; Thu, 12 Mar 2020 10:26:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCOn3-0002ik-T8 for bug-Guix@gnu.org; Thu, 12 Mar 2020 10:26:26 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:18602) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCOn3-0002fb-IW for bug-Guix@gnu.org; Thu, 12 Mar 2020 10:26:25 -0400 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: bug-Guix@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I have a script that starts with: --8<---------------cut here---------------start------------->8--- #!/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash #=20 --8<---------------cut here---------------end--------------->8--- When I call =E2=80=98wrap-script=E2=80=99 on it, it leads to: --8<---------------cut here---------------start------------->8--- #!/gnu/store/0awhym5h0m890n0wq87y0dxznh14rk88-guile-next-3.0.1/bin/guile --= no-auto-compile #!#; Guix wrapper #\-(begin (setenv "PATH" "/gnu/store/9kzrrccpzl6i1sfwb0drb00gi2gwk0x0-coreu= tils-8.31/bin")) #\-(let ((cl (command-line))) (apply execl "/gnu/store/29jhbbg1hf557x8j53f9= sxd9imlmf02a-bash-minimal-5.0.7/bin/bash" (car cl) (cons (car cl) (append (= quote ("")) cl)))) #!/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash #=20 --8<---------------cut here---------------end--------------->8--- The expression (append '("") cl) is incorrect: the empty string shouldn=E2=80=99t be added here. I think one way to fix it is: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/build/utils.scm b/guix/build/utils.scm index b8be73ead4..f9698773c3 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -1295,7 +1295,8 @@ not supported." (car cl) (cons (car cl) (append - ',(string-split args #\space) + ',(string-tokenize args + char-set:graphic) cl)))))) (template (string-append prog ".XXXXXX")) (out (mkstemp! template)) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 DQpMdWRv4oCZLg0K --=-=-=--