From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: bug-Guix@gnu.org
Subject: bug#40039: 'wrap-script' introduces spurious argument
Date: Thu, 12 Mar 2020 15:26:21 +0100 [thread overview]
Message-ID: <87k13psl82.fsf@inria.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
Hello,
I have a script that starts with:
--8<---------------cut here---------------start------------->8---
#!/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash
#
--8<---------------cut here---------------end--------------->8---
When I call ‘wrap-script’ 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-coreutils-8.31/bin"))
#\-(let ((cl (command-line))) (apply execl "/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-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
#
--8<---------------cut here---------------end--------------->8---
The expression (append '("") cl) is incorrect: the empty string
shouldn’t be added here.
I think one way to fix it is:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 786 bytes --]
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))
[-- Attachment #3: Type: text/plain, Size: 12 bytes --]
Ludo’.
next reply other threads:[~2020-03-12 14:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 14:26 Ludovic Courtès [this message]
2020-03-22 0:53 ` bug#40039: 'wrap-script' introduces spurious argument Brendan Tildesley
2020-03-22 10:27 ` Ricardo Wurmus
2020-03-22 11:42 ` Brendan Tildesley
2020-09-13 2:35 ` Brendan Tildesley
2020-09-13 12:23 ` Ricardo Wurmus
2021-04-29 15:23 ` Brendan Tildesley via Bug reports for GNU Guix
2021-09-09 19:02 ` bug#40039: (No Subject) Attila Lendvai
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=87k13psl82.fsf@inria.fr \
--to=ludovic.courtes@inria.fr \
--cc=bug-Guix@gnu.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).