From: Brendan Tildesley <brendan.tildesley@gmail.com>
To: 40039@debbugs.gnu.org
Subject: bug#40039: 'wrap-script' introduces spurious argument
Date: Sun, 22 Mar 2020 11:53:47 +1100 [thread overview]
Message-ID: <2969f516-ca88-ffa6-dd65-f6a29682d42c@gmail.com> (raw)
In-Reply-To: <87k13psl82.fsf@inria.fr>
It appears the repeated (car cl) results in the executable path getting
sent to it's self as the first argument. I'm not sure how things managed
to work up until now? I tested the following change and it fixed the one
case I was using, but am not sure it is correct. why was the cons (car
cl) there in the first place?
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index b8be73ead4..9610f39d71 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -946,7 +946,7 @@ FILE are kept unchanged."
"patch-shebang: ~a:
changing `~a' to `~a'~%"
file (string-append
interp " " arg1) bin)
(patch p bin rest))
- (begin
+ (begin
(format (current-error-port)
"patch-shebang: ~a:
changing `~a' to `~a'~%"
file interp bin)
@@ -1292,11 +1292,10 @@ not supported."
(_ vars))))
`(let ((cl (command-line)))
(apply execl ,interpreter
- (car cl)
- (cons (car cl)
- (append
- ',(string-split args #\space)
- cl))))))
+ (car cl) ;; The program.
+ (append
+ ',(string-tokenize args
#\space)
+ cl)))))
(template (string-append prog ".XXXXXX"))
(out (mkstemp! template))
(st (stat prog))
next prev parent reply other threads:[~2020-03-22 0:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 14:26 bug#40039: 'wrap-script' introduces spurious argument Ludovic Courtès
2020-03-22 0:53 ` Brendan Tildesley [this message]
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=2969f516-ca88-ffa6-dd65-f6a29682d42c@gmail.com \
--to=brendan.tildesley@gmail.com \
--cc=40039@debbugs.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).