From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: More robust substitute* Date: Sat, 02 Feb 2013 17:23:31 +0100 Message-ID: <878v767kho.fsf@gnu.org> References: <201302021714.13440.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]:41439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1fsM-0006fA-JW for bug-guix@gnu.org; Sat, 02 Feb 2013 11:23:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1fsL-0000nC-I5 for bug-guix@gnu.org; Sat, 02 Feb 2013 11:23:34 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:35527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1fsL-0000n8-Bq for bug-guix@gnu.org; Sat, 02 Feb 2013 11:23:33 -0500 In-Reply-To: <201302021714.13440.andreas@enge.fr> (Andreas Enge's message of "Sat, 2 Feb 2013 17:14:13 +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 Hello! Andreas Enge skribis: > in texlive, there are lots of scripts to be installed in share; thus, the= =20 > patch-shebang phase does not catch them. Do you know why it doesn=E2=80=99t catch them? The =E2=80=98patch-source-s= hebangs=E2=80=99 phase patches all the files found under =E2=80=9C.=E2=80=9D, recursively. = Did you by any chance disable that phase? Could you check in the log? > I tried the following: > > (substitute* (find-files "." "") > (("^#!/bin/sh") (string-append "#!" (which "bash")))) > > This chokes on binary files, Yes, it=E2=80=99s not supposed to be used on binary files. Instead, you should use the =E2=80=98patch-shebang=E2=80=99 procedure, whic= h is specifically written to gracefully handle that situation (see guix/build/utils.scm). HTH, Ludo=E2=80=99.