guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] utils: Clean trailing whitespace at end of SHELL


From: Eric Bavier
Subject: [PATCH] utils: Clean trailing whitespace at end of SHELL
Date: Thu, 04 Sep 2014 09:27:11 -0500
User-agent: mu4e 0.9.9.5; emacs 23.3.1

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 "")

The attached patch to core-updates should remedy the problem.

>From c2467a4504737c13435304b1e5c7eb7e4ebf7b70 Mon Sep 17 00:00:00 2001
From: Eric Bavier <address@hidden>
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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index f38b2ca..d6365c0 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -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 (if (string=? args "\n") "" " ") args))))
 
    (when keep-mtime?
      (set-file-time file st))))
-- 
1.7.9.5

-- 
Eric Bavier

reply via email to

[Prev in Thread] Current Thread [Next in Thread]