guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/6] gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to work


From: Ludovic Courtès
Subject: Re: [PATCH 2/6] gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to work regardless of $PATH.
Date: Tue, 14 Feb 2017 09:35:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Efraim Flashner <address@hidden> skribis:

> This is the bootstrap version of 1063d325ea76aa2b00dfcd3d436b16e412103df1
>
> * gnu/packages/bootstrap.scm (%bootstrap-coreutils&co)[source]: Patch
> the absolute location of 'grep' when called from 'egrep' or 'fgrep'.
> ---
>  gnu/packages/bootstrap.scm | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index 3be6e1246..1dd853260 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm
> @@ -325,6 +325,10 @@ $out/bin/guile --version~%"
>                             (chmod "bin" #o755)
>                             (patch-shebang "bin/egrep" path)
>                             (patch-shebang "bin/fgrep" path)
> +                           ;; Patch 'egrep' and 'fgrep' to execute 'grep' 
> via its
> +                           ;; absolute file name instead of searching for it 
> in $PATH.
> +                           (substitute* '("bin/egrep" "bin/fgrep")
> +                             (("grep") (string-append (getcwd) "/bin/grep")))

Am I right that this is not needed if we produce bootstrap binaries with
patch #1 applied?  (That is, where ‘egrep’ and ‘fgrep’ look for ‘grep’
in $PATH.)

OTOH it cannot hurt, so it’s best to apply it.

Have you check whether it works on the other arches, which use an old
grep where ‘egrep’ and ‘fgrep’ are not scripts?  (‘substitute*’ might
throw an exception if it’s passed a binary file, though I think that’s
not the case here.)

If it doesn’t break the other arches, OK for ‘core-updates’, thanks!

Ludo’.



reply via email to

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