From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: [PATCH] gnu-build-system: do not patch symlinks. Fixes location-aware scripts. Date: Sat, 06 Feb 2016 18:26:03 +0100 Message-ID: <87egcpeono.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aS6cj-0005sM-Rb for guix-devel@gnu.org; Sat, 06 Feb 2016 12:26:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aS6cg-0001Vt-LR for guix-devel@gnu.org; Sat, 06 Feb 2016 12:26:17 -0500 Received: from lb3-smtp-cloud2.xs4all.net ([194.109.24.29]:47764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aS6cg-0001VC-Ew for guix-devel@gnu.org; Sat, 06 Feb 2016 12:26:14 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain Hi, When patch-shebang encounters a script that is a symlink, say bin/script -> ../lib/foo/thescript it will change it into a file with rewritten #! . That breaks whenever `thescript' assumes it lives in lib/foo. Attached is a patch that has patch-shebangs skip symlinks. Greetings, Jan --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-build-system-do-not-patch-symlinks.-Fixes-locati.patch >From 5a1793944b6ba1368a355edfa5be1b5c542ba48c Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 6 Feb 2016 15:59:51 +0100 Subject: [PATCH] gnu-build-system: do not patch symlinks. Fixes location-aware scripts. * guix/build/gnu-build-system.scm (patch-shebangs): avoid patching symlinks. Fixes scripts --- guix/build/gnu-build-system.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 2abaa6e..34edff7 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -303,7 +303,7 @@ makefiles." (define (list-of-files dir) (map (cut string-append dir "/" <>) (or (scandir dir (lambda (f) - (let ((s (stat (string-append dir "/" f)))) + (let ((s (lstat (string-append dir "/" f)))) (eq? 'regular (stat:type s))))) '()))) -- 2.1.4 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20 --=-=-=--