From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: #!/usr/bin/env perl Date: Sat, 26 Jan 2013 21:31:48 +0100 Message-ID: <201301262131.48844.andreas@enge.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-01=_00DBRbvF1HhLDoT" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TzCPs-0002P3-Jm for bug-guix@gnu.org; Sat, 26 Jan 2013 15:31:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TzCPq-0000Kw-6b for bug-guix@gnu.org; Sat, 26 Jan 2013 15:31:56 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:61348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TzCPp-0000Kc-TY for bug-guix@gnu.org; Sat, 26 Jan 2013 15:31:54 -0500 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: bug-guix@gnu.org --Boundary-01=_00DBRbvF1HhLDoT Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, the lonely "perl" in a file containing the subject line survives in the patch-shebang phase. Right now, I am patching it by hand to replace the complete line by the path to perl for the curl package; would it make sense to add a general automatism? Andreas --Boundary-01=_00DBRbvF1HhLDoT Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: 7bit

Hello,

 

the lonely "perl" in a file containing the subject line survives in the patch-shebang phase. Right now, I am patching it by hand to replace the complete line by the path to perl for the curl package; would it make sense to add a general automatism?

 

Andreas

 

--Boundary-01=_00DBRbvF1HhLDoT-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: #!/usr/bin/env perl Date: Sat, 26 Jan 2013 22:09:48 +0100 Message-ID: <874ni3ejmr.fsf@gnu.org> References: <201301262131.48844.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TzD0b-0007aN-5Z for bug-guix@gnu.org; Sat, 26 Jan 2013 16:09:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TzD0Z-0005Cd-Je for bug-guix@gnu.org; Sat, 26 Jan 2013 16:09:53 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:4254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TzD0Z-0005CL-DO for bug-guix@gnu.org; Sat, 26 Jan 2013 16:09:51 -0500 In-Reply-To: <201301262131.48844.andreas@enge.fr> (Andreas Enge's message of "Sat, 26 Jan 2013 21:31:48 +0100") 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > the lonely "perl" in a file containing the subject line survives in the=20 > patch-shebang phase. Right now, I am patching it by hand to replace the=20 > complete line by the path to perl for the curl package; would it make sen= se=20 > to add a general automatism? Yes, probably, because the current behavior doesn=E2=80=99t help at all. The function you want to patch ;-) is =E2=80=98patch-shebang=E2=80=99 in build/utils.scm. Since that entails a full rebuild, that=E2=80=99s somethi= ng for a new =E2=80=98core-updates=E2=80=99 branch. Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: #!/usr/bin/env perl Date: Fri, 22 Feb 2013 23:13:24 +0100 Message-ID: <201302222313.25004.andreas@enge.fr> References: <201301262131.48844.andreas@enge.fr> <874ni3ejmr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_E2+JRUEI+ATmVxL" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U90sC-00022B-MJ for bug-guix@gnu.org; Fri, 22 Feb 2013 17:13:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U90s4-00029j-QP for bug-guix@gnu.org; Fri, 22 Feb 2013 17:13:44 -0500 In-Reply-To: <874ni3ejmr.fsf@gnu.org> 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: bug-guix@gnu.org --Boundary-00=_E2+JRUEI+ATmVxL Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Am Samstag, 26. Januar 2013 schrieb Ludovic Court=C3=A8s: > The function you want to patch ;-) is =E2=80=98patch-shebang=E2=80=99 in > build/utils.scm. Since that entails a full rebuild, that=E2=80=99s somet= hing > for a new =E2=80=98core-updates=E2=80=99 branch. Please find attached a patch for review. I tested it on a few example=20 files, but not yet with a real packet - I am waiting for the full rebuild=20 ;-) Andreas --Boundary-00=_E2+JRUEI+ATmVxL Content-Type: text/x-patch; charset="UTF-8"; name="0001-Patch-shebang-Handle-usr-bin-env-command.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Patch-shebang-Handle-usr-bin-env-command.patch" =46rom b4763457c1127a3c910dc3d28f1ce933175a8be0 Mon Sep 17 00:00:00 2001 =46rom: Andreas Enge Date: Fri, 22 Feb 2013 23:00:41 +0100 Subject: [PATCH] Patch-shebang: Handle "#!/usr/bin/env command" * guix/build/utils.scm (patch-shebang): Handle replacement of "#!.*/env CMD ARGS" by "#!/nix/store/path/.../to/CMD ARGS". =2D-- guix/build/utils.scm | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 6921e31..bab82fe 100644 =2D-- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -426,7 +426,7 @@ bytes transferred and the continuation of the transfer = as a thunk." (stat:mtimensec stat))) =20 (define patch-shebang =2D (let ((shebang-rx (make-regexp "^[[:blank:]]*([[:graph:]]+)(.*)$"))) + (let ((shebang-rx (make-regexp "^[[:blank:]]*([[:graph:]]+)[[:blank:]]*(= [[:graph:]]*)(.*)$"))) (lambda* (file #:optional (path (search-path-as-string->list (getenv "PATH"))) @@ -465,16 +465,27 @@ FILE are kept unchanged." (let ((line (false-if-exception (read-line p)))) (and=3D> (and line (regexp-exec shebang-rx line)) (lambda (m) =2D (let* ((cmd (match:substring m 1)) =2D (bin (search-path path (basename cmd)))) + (let* ((first (match:substring m 1)) + (second (match:substring m 2)) + (third (match:substring m 3)) + (has-env (string=3D? (string-pad first 4)= "/env")) + (cmd (if has-env second (basename first))) + (bin (search-path path cmd))) (if bin =2D (if (string=3D? bin cmd) + (if (string=3D? bin first) #f ; nothing to do =2D (begin =2D (format (current-error-port) =2D "patch-shebang: ~a: changi= ng `~a' to `~a'~%" =2D file cmd bin) =2D (patch p bin (match:substring m 2)= ))) + (if has-env + (begin + (format (current-error-port) + "patch-shebang: ~a: changi= ng `~a' to `~a'~%" + file (string-append first = " " second) bin) + (patch p bin third)) + (begin=20 + (format (current-error-port) + "patch-shebang: ~a: changi= ng `~a' to `~a'~%" + file first bin) + (patch p bin + (string-append " " second third)= )))) (begin (format (current-error-port) "patch-shebang: ~a: warning: no = binary for interpreter `~a' found in $PATH~%" =2D-=20 1.7.10.4 --Boundary-00=_E2+JRUEI+ATmVxL-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 00:26:16 +0100 Message-ID: <87ehg87wx3.fsf@gnu.org> References: <201301262131.48844.andreas@enge.fr> <874ni3ejmr.fsf@gnu.org> <201302222313.25004.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U920d-0006GS-P8 for bug-guix@gnu.org; Fri, 22 Feb 2013 18:26:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U920a-00013a-3x for bug-guix@gnu.org; Fri, 22 Feb 2013 18:26:31 -0500 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=40221 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U920Z-00011L-U1 for bug-guix@gnu.org; Fri, 22 Feb 2013 18:26:28 -0500 In-Reply-To: <201302222313.25004.andreas@enge.fr> (Andreas Enge's message of "Fri, 22 Feb 2013 23:13:24 +0100") 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > Am Samstag, 26. Januar 2013 schrieb Ludovic Court=C3=A8s: >> The function you want to patch ;-) is =E2=80=98patch-shebang=E2=80=99 in >> build/utils.scm. Since that entails a full rebuild, that=E2=80=99s some= thing >> for a new =E2=80=98core-updates=E2=80=99 branch. > > Please find attached a patch for review. I tested it on a few example=20 > files, but not yet with a real packet - I am waiting for the full rebuild= =20 > ;-) Heh, thanks. > --- a/guix/build/utils.scm > +++ b/guix/build/utils.scm > @@ -426,7 +426,7 @@ bytes transferred and the continuation of the transfe= r as a thunk." > (stat:mtimensec stat))) >=20=20 > (define patch-shebang > - (let ((shebang-rx (make-regexp "^[[:blank:]]*([[:graph:]]+)(.*)$"))) > + (let ((shebang-rx (make-regexp "^[[:blank:]]*([[:graph:]]+)[[:blank:]]= *([[:graph:]]*)(.*)$"))) I think it should be a + after the second [[:blank:]], because there should be space between the interpreter name and its argument. > (lambda* (file > #:optional > (path (search-path-as-string->list (getenv "PATH"))) > @@ -465,16 +465,27 @@ FILE are kept unchanged." > (let ((line (false-if-exception (read-line p)))) > (and=3D> (and line (regexp-exec shebang-rx line)) > (lambda (m) > - (let* ((cmd (match:substring m 1)) > - (bin (search-path path (basename cmd)))) > + (let* ((first (match:substring m 1)) > + (second (match:substring m 2)) > + (third (match:substring m 3)) What about more descriptive names like =E2=80=98interp=E2=80=99, =E2=80=98a= rg1=E2=80=99, and =E2=80=98rest=E2=80=99? > + (has-env (string=3D? (string-pad first = 4) "/env")) Rather (has-env? (string-suffix? "/env" interp)). > + (if has-env > + (begin Please align with the =E2=80=98h=E2=80=99 here... > + (patch p bin > + (string-append " " second thir= d))))) ... and with the =E2=80=98p=E2=80=99 here. Modulo these details, looks good to me, so feel free to push! Thanks, Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 01:03:21 +0100 Message-ID: <201302230103.21985.andreas@enge.fr> References: <201301262131.48844.andreas@enge.fr> <201302222313.25004.andreas@enge.fr> <87ehg87wx3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U92aS-0004eT-7K for bug-guix@gnu.org; Fri, 22 Feb 2013 19:03:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U92aM-0000NK-SV for bug-guix@gnu.org; Fri, 22 Feb 2013 19:03:32 -0500 In-Reply-To: <87ehg87wx3.fsf@gnu.org> 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: bug-guix@gnu.org Am Samstag, 23. Februar 2013 schrieb Ludovic Court=C3=A8s: > > (make-regexp > > "^[[:blank:]]*([[:graph:]]+)[[:blank:]]*([[:graph:]]*)(.*)$"))) >=20 > I think it should be a + after the second [[:blank:]], because there > should be space between the interpreter name and its argument. Sometimes, there is no space at all: In #!/usr/bin/perl for instance, when there is no argument. Then the "+" version would fail.=20 With "*", it works as expected. > What about more descriptive names like =E2=80=98interp=E2=80=99, =E2=80= =98arg1=E2=80=99, and =E2=80=98rest=E2=80=99? Maybe. I did not choose descriptive names because the real interpreter is=20 sometimes the first, sometimes the second piece. But your suggestion looks= =20 good. > Rather (has-env? (string-suffix? "/env" interp)). Ok, thanks. > > + (if has-env > > + (begin > Please align with the =E2=80=98h=E2=80=99 here... > > + (patch p bin > > + (string-append " " second > > third))))) > ... and with the =E2=80=98p=E2=80=99 here. Ok. The annoying thing with this way of indenting is that lines become very= =20 long very quickly; I like keeping them at less than 80 characters. Andreas From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 16:15:51 +0100 Message-ID: <878v6f6oyg.fsf@gnu.org> References: <201301262131.48844.andreas@enge.fr> <201302222313.25004.andreas@enge.fr> <87ehg87wx3.fsf@gnu.org> <201302230103.21985.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9Gpa-0002Qr-SL for bug-guix@gnu.org; Sat, 23 Feb 2013 10:16:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9GpW-000198-OB for bug-guix@gnu.org; Sat, 23 Feb 2013 10:16:06 -0500 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=51247 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9GpW-000188-I7 for bug-guix@gnu.org; Sat, 23 Feb 2013 10:16:02 -0500 In-Reply-To: <201302230103.21985.andreas@enge.fr> (Andreas Enge's message of "Sat, 23 Feb 2013 01:03:21 +0100") 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > Am Samstag, 23. Februar 2013 schrieb Ludovic Court=C3=A8s: >> > (make-regexp >> > "^[[:blank:]]*([[:graph:]]+)[[:blank:]]*([[:graph:]]*)(.*)$"))) >>=20 >> I think it should be a + after the second [[:blank:]], because there >> should be space between the interpreter name and its argument. > > Sometimes, there is no space at all: In > #!/usr/bin/perl > for instance, when there is no argument. Then the "+" version would fail.= =20 > With "*", it works as expected. Oh, right. >> > + (if has-env >> > + (begin >> Please align with the =E2=80=98h=E2=80=99 here... >> > + (patch p bin >> > + (string-append " " second >> > third))))) >> ... and with the =E2=80=98p=E2=80=99 here. > > Ok. The annoying thing with this way of indenting is that lines become ve= ry=20 > long very quickly; I like keeping them at less than 80 characters. When it becomes too long, it=E2=80=99s sometimes a sign that an auxiliary function may be needed. Thanks! Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 17:21:26 +0100 Message-ID: <201302231721.26689.andreas@enge.fr> References: <201301262131.48844.andreas@enge.fr> <874ni3ejmr.fsf@gnu.org> <201302222313.25004.andreas@enge.fr> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_GyOKR9p0d1vUx8G" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9Hqy-0003O0-Un for bug-guix@gnu.org; Sat, 23 Feb 2013 11:21:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9Hqt-00082W-PR for bug-guix@gnu.org; Sat, 23 Feb 2013 11:21:36 -0500 In-Reply-To: <201302222313.25004.andreas@enge.fr> 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: bug-guix@gnu.org --Boundary-00=_GyOKR9p0d1vUx8G Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Am Freitag, 22. Februar 2013 schrieb Andreas Enge: > Please find attached a patch for review. I tested it on a few example > files, but not yet with a real packet - I am waiting for the full > rebuild ;-) I had test failures in coreutils, and to check whether it was related to my patch, I tried from scratch with the current core-updates branch. Any call to guix aborts with Backtrace: In ice-9/boot-9.scm: 149: 9 [catch #t # ...] 157: 8 [#] In unknown file: ?: 7 [catch-closure] In ice-9/boot-9.scm: 63: 6 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 407: 5 [eval # #] In ice-9/boot-9.scm: 2111: 4 [save-module-excursion #] 3651: 3 [#] In unknown file: ?: 2 [load-compiled/vm "/home/privat/.cache/guile/ccache/2.0- LE-8-2.0/usr/local/guix-git/bin/guix.go"] In /usr/local/bin/guix: 59: 1 [#] In unknown file: ?: 0 [scm-error misc-error #f ...] ERROR: In procedure scm-error: ERROR: No variable named guix-main in # I am also attaching the final patch-shebang patch. Andreas --Boundary-00=_GyOKR9p0d1vUx8G Content-Type: text/x-patch; charset="UTF-8"; name="0001-Patch-shebang-Handle-usr-bin-env-command.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Patch-shebang-Handle-usr-bin-env-command.patch" =46rom 63ac645147871eb773032da23d9f52bbd4f823eb Mon Sep 17 00:00:00 2001 =46rom: Andreas Enge Date: Fri, 22 Feb 2013 23:00:41 +0100 Subject: [PATCH] Patch-shebang: Handle "#!/usr/bin/env command" * guix/build/utils.scm (patch-shebang): Handle replacement of "#!.*/env CMD ARGS" by "#!/nix/store/path/.../to/CMD ARGS". =2D-- guix/build/utils.scm | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 6921e31..82042e9 100644 =2D-- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2012, 2013 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2013 Andreas Enge ;;; ;;; This file is part of GNU Guix. ;;; @@ -426,7 +427,7 @@ bytes transferred and the continuation of the transfer = as a thunk." (stat:mtimensec stat))) =20 (define patch-shebang =2D (let ((shebang-rx (make-regexp "^[[:blank:]]*([[:graph:]]+)(.*)$"))) + (let ((shebang-rx (make-regexp "^[[:blank:]]*([[:graph:]]+)[[:blank:]]*(= [[:graph:]]*)(.*)$"))) (lambda* (file #:optional (path (search-path-as-string->list (getenv "PATH"))) @@ -465,16 +466,27 @@ FILE are kept unchanged." (let ((line (false-if-exception (read-line p)))) (and=3D> (and line (regexp-exec shebang-rx line)) (lambda (m) =2D (let* ((cmd (match:substring m 1)) =2D (bin (search-path path (basename cmd)))) + (let* ((interp (match:substring m 1)) + (arg1 (match:substring m 2)) + (rest (match:substring m 3)) + (has-env (string-suffix? "/env" interp)) + (cmd (if has-env arg1 (basename interp))) + (bin (search-path path cmd))) (if bin =2D (if (string=3D? bin cmd) + (if (string=3D? bin interp) #f ; nothing to do =2D (begin =2D (format (current-error-port) =2D "patch-shebang: ~a: changi= ng `~a' to `~a'~%" =2D file cmd bin) =2D (patch p bin (match:substring m 2)= ))) + (if has-env + (begin + (format (current-error-port) + "patch-shebang: ~a: chan= ging `~a' to `~a'~%" + file (string-append inte= rp " " arg1) bin) + (patch p bin rest)) + (begin=20 + (format (current-error-port) + "patch-shebang: ~a: changi= ng `~a' to `~a'~%" + file interp bin) + (patch p bin + (string-append " " arg1 res= t))))) (begin (format (current-error-port) "patch-shebang: ~a: warning: no = binary for interpreter `~a' found in $PATH~%" =2D-=20 1.7.10.4 --Boundary-00=_GyOKR9p0d1vUx8G-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 18:31:12 +0100 Message-ID: <87621j544f.fsf@gnu.org> References: <201301262131.48844.andreas@enge.fr> <874ni3ejmr.fsf@gnu.org> <201302222313.25004.andreas@enge.fr> <201302231721.26689.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9IwY-0002Qz-JI for bug-guix@gnu.org; Sat, 23 Feb 2013 12:31:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9IwV-00010i-No for bug-guix@gnu.org; Sat, 23 Feb 2013 12:31:26 -0500 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=46363 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9IwV-0000yY-HX for bug-guix@gnu.org; Sat, 23 Feb 2013 12:31:23 -0500 In-Reply-To: <201302231721.26689.andreas@enge.fr> (Andreas Enge's message of "Sat, 23 Feb 2013 17:21:26 +0100") 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > I had test failures in coreutils, Do you still have the details around? =E2=80=98env=E2=80=99 is part of Cor= eutils, so it may be that it=E2=80=99s testing its behavior, and that patching prevents t= hat. Perhaps =E2=80=98patch-shebang=E2=80=99 could have a =E2=80=98patch-env?=E2= =80=99 keyword parameter, defaulting to #t, and if the above is correct, we=E2=80=99d instead arrange= to have it called with #:patch-env? #f. > and to check whether it was related to my patch, I tried from scratch > with the current core-updates branch. Any call to guix aborts with [...] > In /usr/local/bin/guix: > 59: 1 [#] > In unknown file: > ?: 0 [scm-error misc-error #f ...] > > ERROR: In procedure scm-error: > ERROR: No variable named guix-main in # You should be using =E2=80=98./pre-inst-env guix build xxx=E2=80=99, which = you don=E2=80=99t seem to be doing, no? For info about why this happens, you could try: guile -c '(pk (@ (guix ui) guix-main))' > From 63ac645147871eb773032da23d9f52bbd4f823eb Mon Sep 17 00:00:00 2001 > From: Andreas Enge > Date: Fri, 22 Feb 2013 23:00:41 +0100 > Subject: [PATCH] Patch-shebang: Handle "#!/usr/bin/env command" > > * guix/build/utils.scm (patch-shebang): Handle replacement of > "#!.*/env CMD ARGS" by "#!/nix/store/path/.../to/CMD ARGS". Looks good to me. Perhaps the only thing left will be the addition of #:patch-env?, unless that turns out to be unnecessary. Thanks! Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 18:48:08 +0100 Message-ID: <201302231848.08892.andreas@enge.fr> References: <201301262131.48844.andreas@enge.fr> <201302231721.26689.andreas@enge.fr> <87621j544f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9JD0-0006Sx-9l for bug-guix@gnu.org; Sat, 23 Feb 2013 12:48:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9JCs-0006Tp-QG for bug-guix@gnu.org; Sat, 23 Feb 2013 12:48:26 -0500 In-Reply-To: <87621j544f.fsf@gnu.org> 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: bug-guix@gnu.org Am Samstag, 23. Februar 2013 schrieb Ludovic Court=C3=A8s: > Andreas Enge skribis: > > I had test failures in coreutils, >=20 > Do you still have the details around? =E2=80=98env=E2=80=99 is part of C= oreutils, so it > may be that it=E2=80=99s testing its behavior, and that patching prevents= that. This was also my suspicion, but it did not seem to be the case - I looked=20 at what was patch-shebanged, and none of it contained "env". I will check=20 again once core-updates works. > > In /usr/local/bin/guix: > > 59: 1 [#] > >=20 > > In unknown file: > > ?: 0 [scm-error misc-error #f ...] > >=20 > > ERROR: In procedure scm-error: > > ERROR: No variable named guix-main in # >=20 > You should be using =E2=80=98./pre-inst-env guix build xxx=E2=80=99, whic= h you don=E2=80=99t > seem to be doing, no? No, but I always do "make install" first. Prepending "./pre-inst-env" does= =20 not change anything. > For info about why this happens, you could try: > guile -c '(pk (@ (guix ui) guix-main))' Backtrace: In ice-9/boot-9.scm: 149: 10 [catch #t # ...] 157: 9 [#] In unknown file: ?: 8 [catch-closure] In ice-9/boot-9.scm: 63: 7 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 407: 6 [eval # #] In unknown file: ?: 5 [call-with-input-string "(pk (@ (guix ui) guix-main))" ...] In ice-9/command-line.scm: 174: 4 [#=20 #] In unknown file: ?: 3 [eval (pk (@ (guix ui) guix-main)) #] In ice-9/eval.scm: 368: 2 [eval # ()] 425: 1 [eval # ()] In unknown file: ?: 0 [memoize-variable-access! # #f] ERROR: In procedure memoize-variable-access!: ERROR: In procedure module-lookup: Wrong type argument in position 1=20 (expecting module): #f $ guile --version guile (GNU Guile) 2.0.5-deb+1-3 Andreas From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 19:45:48 +0100 Message-ID: <871uc66f8j.fsf@gnu.org> References: <201301262131.48844.andreas@enge.fr> <201302231721.26689.andreas@enge.fr> <87621j544f.fsf@gnu.org> <201302231848.08892.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9K6k-0006dQ-E9 for bug-guix@gnu.org; Sat, 23 Feb 2013 13:46:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9K6h-00064d-QR for bug-guix@gnu.org; Sat, 23 Feb 2013 13:46:02 -0500 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=47832 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9K6h-00060u-Hv for bug-guix@gnu.org; Sat, 23 Feb 2013 13:45:59 -0500 In-Reply-To: <201302231848.08892.andreas@enge.fr> (Andreas Enge's message of "Sat, 23 Feb 2013 18:48:08 +0100") 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: >> For info about why this happens, you could try: >> guile -c '(pk (@ (guix ui) guix-main))' [...] > In unknown file: > ?: 0 [memoize-variable-access! # #f] > > ERROR: In procedure memoize-variable-access!: > ERROR: In procedure module-lookup: Wrong type argument in position 1=20 > (expecting module): #f Hmm, what about guile -c '(use-modules (guix ui))'? Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 19:58:26 +0100 Message-ID: <201302231958.26123.andreas@enge.fr> References: <201301262131.48844.andreas@enge.fr> <201302231848.08892.andreas@enge.fr> <871uc66f8j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9KJ3-0001Qj-34 for bug-guix@gnu.org; Sat, 23 Feb 2013 13:58:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9KIv-0000y7-MS for bug-guix@gnu.org; Sat, 23 Feb 2013 13:58:44 -0500 In-Reply-To: <871uc66f8j.fsf@gnu.org> 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: bug-guix@gnu.org Am Samstag, 23. Februar 2013 schrieb Ludovic Court=C3=A8s: > Hmm, what about guile -c '(use-modules (guix ui))'? In ice-9/boot-9.scm: 149: 16 [catch #t # ...] 157: 15 [#] In unknown file: ?: 14 [catch-closure] In ice-9/boot-9.scm: 63: 13 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 407: 12 [eval # #] In unknown file: ?: 11 [call-with-input-string "(use-modules (guix ui))" ...] In ice-9/command-line.scm: 174: 10 [#=20 #] In unknown file: ?: 9 [eval (use-modules (guix ui)) #] In ice-9/eval.scm: 480: 8 [# (use-modules=20 (guix ui))] In ice-9/psyntax.scm: 1101: 7 [expand-top-sequence ((use-modules (guix ui))) () ...] 986: 6 [scan ((use-modules (guix ui))) () ...] 270: 5 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...] In ice-9/boot-9.scm: 3244: 4 [process-use-modules (((guix ui)))] 545: 3 [map #=20 ((#))] 3245: 2 [# ((guix= =20 ui))] 2583: 1 [resolve-interface (guix ui) #:select ...] In unknown file: ?: 0 [scm-error misc-error #f "~A ~S" ("no code for module" (guix ui))=20 #f] ERROR: In procedure scm-error: ERROR: no code for module (guix ui) Very strange. I have ui.{scm,go} in the installation location in /usr/local/guix-git/share/guile/site/2.0/guix/, and also in the guix=20 subdirectory of the source directory. With master, there are no problems. Andreas From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 20:14:23 +0100 Message-ID: <87ppzq4zcg.fsf@gnu.org> References: <201301262131.48844.andreas@enge.fr> <201302231848.08892.andreas@enge.fr> <871uc66f8j.fsf@gnu.org> <201302231958.26123.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9KYT-0004Fx-J1 for bug-guix@gnu.org; Sat, 23 Feb 2013 14:14:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9KYN-0005FD-0G for bug-guix@gnu.org; Sat, 23 Feb 2013 14:14:41 -0500 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=33469 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9KYM-00051L-Q0 for bug-guix@gnu.org; Sat, 23 Feb 2013 14:14:34 -0500 In-Reply-To: <201302231958.26123.andreas@enge.fr> (Andreas Enge's message of "Sat, 23 Feb 2013 19:58:26 +0100") 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > Very strange. I have ui.{scm,go} in the installation location in > /usr/local/guix-git/share/guile/site/2.0/guix/, and also in the guix=20 > subdirectory of the source directory. With master, there are no problems. Aaah yes, that=E2=80=99s because =E2=80=98master=E2=80=99 (which adds the = =E2=80=98guix=E2=80=99 script) hasn=E2=80=99t been merged yet into =E2=80=98core-updates=E2=80=99. I=E2=80=99ve done it = locally, and will probably push real soon, but in the meantime you must still use =E2=80=98./pre-inst-env guix-build=E2=80=99 on =E2=80=98core-updates=E2=80= =99. Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: #!/usr/bin/env perl Date: Sat, 23 Feb 2013 20:19:03 +0100 Message-ID: <201302232019.03576.andreas@enge.fr> References: <201301262131.48844.andreas@enge.fr> <201302231958.26123.andreas@enge.fr> <87ppzq4zcg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9Kcv-00050G-9H for bug-guix@gnu.org; Sat, 23 Feb 2013 14:19:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9Kcm-0006Dq-Sj for bug-guix@gnu.org; Sat, 23 Feb 2013 14:19:17 -0500 In-Reply-To: <87ppzq4zcg.fsf@gnu.org> 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: bug-guix@gnu.org Am Samstag, 23. Februar 2013 schrieb Ludovic Court=C3=A8s: > Aaah yes, that=E2=80=99s because =E2=80=98master=E2=80=99 (which adds the= =E2=80=98guix=E2=80=99 script) hasn=E2=80=99t > been merged yet into =E2=80=98core-updates=E2=80=99. I=E2=80=99ve done i= t locally, and will > probably push real soon, but in the meantime you must still use > =E2=80=98./pre-inst-env guix-build=E2=80=99 on =E2=80=98core-updates=E2= =80=99. Okay, I see. I used "./pre-inst-env guix build". Andreas From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: #!/usr/bin/env perl Date: Sun, 24 Feb 2013 21:49:05 -0500 Message-ID: <87k3px5cri.fsf@tines.lan> References: <201301262131.48844.andreas@enge.fr> <874ni3ejmr.fsf@gnu.org> <201302222313.25004.andreas@enge.fr> <201302231721.26689.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9o84-00028a-4v for bug-guix@gnu.org; Sun, 24 Feb 2013 21:49:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9o7z-0008S8-Hu for bug-guix@gnu.org; Sun, 24 Feb 2013 21:49:24 -0500 Received: from world.peace.net ([96.39.62.75]:59717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9o7z-0008S1-DU for bug-guix@gnu.org; Sun, 24 Feb 2013 21:49:19 -0500 In-Reply-To: <201302231721.26689.andreas@enge.fr> (Andreas Enge's message of "Sat, 23 Feb 2013 17:21:26 +0100") 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Hi Andreas, Andreas Enge writes: > (has-env (string-suffix? "/env" interp)) I think we might want to make this test more restrictive. I'm looking at a package (guile-figl) that includes an 'env' script in its build directory, analogous to 'pre-inst-env' in Guix. This makes me worry that the test above will have false positives. In practice, the path used is (almost?) always "/usr/bin/env". I suspect it would be safer to check for that exact string. What do you think? Mark From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: #!/usr/bin/env perl Date: Mon, 25 Feb 2013 10:43:12 +0100 Message-ID: <201302251043.12376.andreas@enge.fr> References: <201301262131.48844.andreas@enge.fr> <201302231721.26689.andreas@enge.fr> <87k3px5cri.fsf@tines.lan> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9uay-0000GY-DQ for bug-guix@gnu.org; Mon, 25 Feb 2013 04:43:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9uar-0001qJ-Cn for bug-guix@gnu.org; Mon, 25 Feb 2013 04:43:40 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]:65243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9uar-0001qB-30 for bug-guix@gnu.org; Mon, 25 Feb 2013 04:43:33 -0500 In-Reply-To: <87k3px5cri.fsf@tines.lan> 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Mark H Weaver Cc: bug-guix@gnu.org Am Montag, 25. Februar 2013 schrieb Mark H Weaver: > Andreas Enge writes: > > (has-env (string-suffix? "/env" interp)) > > I think we might want to make this test more restrictive. I'm looking > at a package (guile-figl) that includes an 'env' script in its build > directory, analogous to 'pre-inst-env' in Guix. This makes me worry > that the test above will have false positives. > > In practice, the path used is (almost?) always "/usr/bin/env". > I suspect it would be safer to check for that exact string. I also wondered whether we should do this. Do you have a concrete example where the current test fails? Notice that the suffix is only part of the test; currently, we patch files that start with [[:blank:]]*#![[:graph:]]*/env Unless a problem manifests itself, I would not change that behaviour. Andreas From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: #!/usr/bin/env perl Date: Mon, 25 Feb 2013 16:40:27 +0100 Message-ID: <87fw0kxuz8.fsf@gnu.org> References: <201301262131.48844.andreas@enge.fr> <201302231721.26689.andreas@enge.fr> <87k3px5cri.fsf@tines.lan> <201302251043.12376.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA0AT-0003u6-Gl for bug-guix@gnu.org; Mon, 25 Feb 2013 10:40:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UA0AQ-0005vH-6W for bug-guix@gnu.org; Mon, 25 Feb 2013 10:40:41 -0500 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=55986 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA0AP-0005ru-TQ for bug-guix@gnu.org; Mon, 25 Feb 2013 10:40:38 -0500 In-Reply-To: <201302251043.12376.andreas@enge.fr> (Andreas Enge's message of "Mon, 25 Feb 2013 10:43:12 +0100") 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > Am Montag, 25. Februar 2013 schrieb Mark H Weaver: >> Andreas Enge writes: >> > (has-env (string-suffix? "/env" interp)) >>=20 >> I think we might want to make this test more restrictive. I'm looking >> at a package (guile-figl) that includes an 'env' script in its build >> directory, analogous to 'pre-inst-env' in Guix. I suspect it=E2=80=99s never used in a shebang though, no? >> In practice, the path used is (almost?) always "/usr/bin/env". >> I suspect it would be safer to check for that exact string. That=E2=80=99s probably true. > I also wondered whether we should do this. Do you have a concrete example= =20 > where the current test fails? Notice that the suffix is only part of the= =20 > test; currently, we patch files that start with > [[:blank:]]*#![[:graph:]]*/env > Unless a problem manifests itself, I would not change that behaviour. Yes, makes sense to wait for evidence. Ludo=E2=80=99.