From: Ricardo Wurmus <rekado@elephly.net>
To: John Darrington <jmd@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: postgresql: Substitute hard coded "/bin/sh".
Date: Thu, 24 Mar 2016 22:24:32 +0100 [thread overview]
Message-ID: <871t6z36y7.fsf@elephly.net> (raw)
In-Reply-To: <1458853944-26415-1-git-send-email-jmd@gnu.org>
Hi John,
thanks for the patch! While the patch looks generally okay, I do want
to make a few nit-picking comments.
> * gnu/packages/databses.scm (postgresql): substitute /bin/sh
> with location of bash binary.
^
\_ why two spaces?
> (build-system gnu-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-before
> + 'configure 'patch-/bin/sh
we usually keep these on the same line as “add-before”.
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let ((bash (assoc-ref inputs "bash")))
> + ;; Refer to the actual shell.
> + (substitute* '("src/bin/pg_ctl/pg_ctl.c"
> + "src/bin/psql/command.c")
> + (("/bin/sh")
> + (string-append bash "/bin/sh")))))))))
I think we could just do this:
(lambda _
(substitute* '(...)
(("/bin/sh") (which "sh")))
#t)
Also note the final “#t” because “substitute*” has an undetermined
return value.
What do you think?
~~ Ricardo
next prev parent reply other threads:[~2016-03-24 21:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 17:54 [PATCH 1/2] gnu: postgresql: Substitute hard coded "/bin/sh" John Darrington
2016-03-24 18:18 ` Thompson, David
2016-03-24 21:12 ` [PATCH] " John Darrington
2016-03-24 21:24 ` Ricardo Wurmus [this message]
2016-03-25 7:29 ` John Darrington
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871t6z36y7.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=guix-devel@gnu.org \
--cc=jmd@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).