Patchwork [3/4] gnu: xapian: Use 'modify-phases'.

login
register
mail settings
Submitter Marius Bakke
Date Oct. 17, 2016, 4:55 p.m.
Message ID <20161017165506.17750-4-mbakke@fastmail.com>
Download mbox | patch
Permalink /patch/16584/
State New
Headers show

Comments

Marius Bakke - Oct. 17, 2016, 4:55 p.m.
* gnu/packages/search.scm (xapian)[arguments]: Use 'modify-phases'.
---
 gnu/packages/search.scm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Leo Famulari - Oct. 17, 2016, 6 p.m.
On Mon, Oct 17, 2016 at 05:55:05PM +0100, Marius Bakke wrote:
> * gnu/packages/search.scm (xapian)[arguments]: Use 'modify-phases'.

> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'patch-remotetcp-harness
> +           (lambda _
> +             (substitute* "tests/harness/backendmanager_remotetcp.cc"
> +               (("/bin/sh") (which "bash"))))))))

Please change it to use (which "sh") instead. Bash changes its behavior
based on whether it is called as `bash` or `sh` (see Invocation in
bash(1)).

Otherwise LGTM.
Marius Bakke - Oct. 17, 2016, 6:50 p.m.
Leo Famulari <leo@famulari.name> writes:

> On Mon, Oct 17, 2016 at 05:55:05PM +0100, Marius Bakke wrote:
>> * gnu/packages/search.scm (xapian)[arguments]: Use 'modify-phases'.
>
>> +     `(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-after 'unpack 'patch-remotetcp-harness
>> +           (lambda _
>> +             (substitute* "tests/harness/backendmanager_remotetcp.cc"
>> +               (("/bin/sh") (which "bash"))))))))
>
> Please change it to use (which "sh") instead. Bash changes its behavior
> based on whether it is called as `bash` or `sh` (see Invocation in
> bash(1)).

I'm aware, but decided to remove it in the subsequent patch since it was
"buggy" anyway, and is not needed when remote TCP tests are disabled.

It was left to avoid justifying the fix when changing to modify-phases.
The phase also does not end on a #t.

But I agree, might as well just fix it and leave it even if the tests
don't use it.

Patch

diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm
index 9eb4039..a43abde 100644
--- a/gnu/packages/search.scm
+++ b/gnu/packages/search.scm
@@ -46,12 +46,12 @@ 
     (inputs `(("zlib" ,zlib)
               ("util-linux" ,util-linux)))
     (arguments
-     `(#:phases (alist-cons-after
-                 'unpack 'patch-remotetcp-harness
-                 (lambda _
-                   (substitute* "tests/harness/backendmanager_remotetcp.cc"
-                     (("/bin/sh") (which "bash"))))
-                 %standard-phases)))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-remotetcp-harness
+           (lambda _
+             (substitute* "tests/harness/backendmanager_remotetcp.cc"
+               (("/bin/sh") (which "bash"))))))))
     (synopsis "Search Engine Library")
     (description
      "Xapian is a highly adaptable toolkit which allows developers to easily