GNU bug report logs - #19742
'wrap-program' should really preserve argv[0]

Previous Next

Package: guix;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Sun, 1 Feb 2015 23:32:02 UTC

Severity: normal

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andreas Enge <andreas <at> enge.fr>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#19742: closed ('wrap-program' should really preserve argv[0])
Date: Mon, 16 Feb 2015 14:27:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 16 Feb 2015 15:26:28 +0100
with message-id <20150216142628.GA21619 <at> debian.math.u-bordeaux1.fr>
and subject line Close
has caused the debbugs.gnu.org bug report #19742,
regarding 'wrap-program' should really preserve argv[0]
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
19742: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19742
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: bug-guix <at> gnu.org
Subject: 'wrap-program' should really preserve argv[0]
Date: Sun, 01 Feb 2015 22:39:53 +0100
[Message part 3 (text/plain, inline)]
It should be enough, and more appropriate, to simply preserve argv[0] in
wrappers.

Ludo’.

[Message part 4 (text/x-patch, inline)]
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 4407f9a..ebe70a3 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -870,8 +870,7 @@ the previous wrapper."
     (with-output-to-file prog-tmp
       (lambda ()
         (format #t
-                "#!~a~%~a~%exec -a \"~a\" \"~a\" \"$@\"~%"
-                (which "bash")
+                "#!~a~%~a~%exec -a \"$0\" \"~a\" \"$@\"~%"
                 (string-join (map export-variable vars)
                              "\n")
                 (canonicalize-path prog)
[Message part 5 (message/rfc822, inline)]
From: Andreas Enge <andreas <at> enge.fr>
To: 19742-done <at> debbugs.gnu.org
Subject: Close
Date: Mon, 16 Feb 2015 15:26:28 +0100
Applied in commit b01f89675d03202851a00c38d4995424bbb1879f.

Andreas



This bug report was last modified 10 years and 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.