Subject: [PATCH] gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to point to the correct grep.
From: [email-masked]
To: [email-masked]
Cc: [email-masked], Manolis Ragkousis <[email-masked]>
Date: Thu, 23 Feb 2017 13:41:19 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

From: Manolis Ragkousis <[email-masked]>

* gnu/packages/bootstrap.scm (%bootstrap-coreutils&co)[source]: Substitute the
absolute location of 'grep' with the one in /gnu/store.
---
 gnu/packages/bootstrap.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 61f1f1ab3..db7560b48 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -341,7 +341,8 @@ $out/bin/guile --version~%"
                            ;; absolute file name instead of searching for it in $PATH.
                            (if (not (elf-file? "bin/egrep"))
                              (substitute* '("bin/egrep" "bin/fgrep")
-                               (("^exec grep") (string-append (getcwd) "/bin/grep"))))
+                               (("/[^ ]+/bin/grep")
+                                (string-append out "/bin/grep"))))
                            (chmod "bin" #o555)
                            #t)))
 
-- 
2.11.1