From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH] utils: Clean trailing whitespace at end of SHELL Date: Fri, 05 Sep 2014 00:05:10 -0500 Message-ID: <878uly3beg.fsf@gmail.com> References: <87bnqv31hc.fsf@member.fsf.org> <87ppfb89n9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPlhy-0000qP-Nq for guix-devel@gnu.org; Fri, 05 Sep 2014 01:05:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPlht-0001NM-FQ for guix-devel@gnu.org; Fri, 05 Sep 2014 01:05:14 -0400 In-reply-to: <87ppfb89n9.fsf@gnu.org> 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: =?utf-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Ludovic Courtès writes: > Eric Bavier skribis: > >> I found an unfortunate bug in the last patch I made to >> patch-makefile-SHELL that would leave a trailing ' ' at the end of SHELL >> assignments. This is fine for most packages, but caused >> gobject-introspection to fail building for me just now (for the curious: >> it effectively does an "(apply system* (string-split (string-append SHELL >> " " "./libtool") #\space))" which causes sh to try to execute "") > > AFAIK trailing whitespace in assignments is ignored by ‘make’. > > I grepped gobject-introspection out of curiosity and couldn’t find any > suspicious SHELL assignment. Do you still have it around? E.g. gobject-introspection-1.38.0/giscanner/utils.py:124 > The (string=? args "\n") seems specific and non-obvious. I thought so too. Your suggestion does work. With this patch, I was able to bootstrap and build gobject-introspection. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-utils-Clean-trailing-whitespace-at-end-of-SHELL.patch >From 11459384968f654c42ad7dba4443dada35191f5b Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Thu, 4 Sep 2014 09:19:24 -0500 Subject: [PATCH] utils: Clean trailing whitespace at end of SHELL * guix/build/utils.scm (patch-makefile-SHELL): Remove trailing whitespace. --- guix/build/utils.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/build/utils.scm b/guix/build/utils.scm index f38b2ca..d169053 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -582,7 +582,7 @@ When KEEP-MTIME? is true, the atime/mtime of FILE are kept unchanged." (let ((st (stat file))) (substitute* file - (("^ *SHELL[[:blank:]]*=[[:blank:]]*([[:graph:]]*/)([[:graph:]]+)[[:blank:]]*(.*)$" + (("^ *SHELL[[:blank:]]*=[[:blank:]]*([[:graph:]]*/)([[:graph:]]+)(.*)$" _ dir shell args) (let* ((old (string-append dir shell)) (new (or (find-shell shell) old))) @@ -590,7 +590,7 @@ When KEEP-MTIME? is true, the atime/mtime of FILE are kept unchanged." (format (current-error-port) "patch-makefile-SHELL: ~a: changing `SHELL' from `~a' to `~a'~%" file old new)) - (string-append "SHELL = " new " " args)))) + (string-append "SHELL = " new args)))) (when keep-mtime? (set-file-time file st)))) -- 1.7.9.5 --=-=-= -- Eric Bavier --=-=-=--