From: Christopher Baines <mail@cbaines.net>
To: Marius Bakke <mbakke@fastmail.com>
Cc: 26770-done@debbugs.gnu.org
Subject: bug#26770: [PATCH] gnu: tailon: Use absolute paths for commands.
Date: Thu, 18 May 2017 19:50:02 +0100 [thread overview]
Message-ID: <bd3f0095-de16-60c7-c649-4d4b89a9ad9f@cbaines.net> (raw)
In-Reply-To: <87o9urcz5y.fsf@fastmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1940 bytes --]
On 17/05/17 15:53, Marius Bakke wrote:
> Christopher Baines <mail@cbaines.net> writes:
>
>> On Mon, 15 May 2017 17:59:42 +0200
>> Marius Bakke <mbakke@fastmail.com> wrote:
>>
>>> Christopher Baines <mail@cbaines.net> writes:
>>>> + (add-after 'install 'wrap-tailon-path
>>>> + (lambda* (#:key inputs outputs
>>>> #:allow-other-keys)
>>>> + (let ((out (assoc-ref outputs "out")))
>>>> + (substitute* (find-files out "commands.py")
>>>> + (("self\\.first_in_path\\('grep'\\)")
>>>> + (string-append"'" (which "grep") "'"))
>>>> + (("self\\.first_in_path\\('gawk',
>>>> 'awk'\\)")
>>>> + (string-append"'" (which "gawk") "'"))
>>>> + (("self\\.first_in_path\\('gsed',
>>>> 'sed'\\)")
>>>> + (string-append"'" (which "sed") "'"))
>>>> + (("self\\.first_in_path\\('gtail',
>>>> 'tail'\\)")
>>>> + (string-append"'" (which "tail") "'")))
>>>> + #t))))))
>>>
>>> Is there any particular reason this phase runs after 'install'? I
>>> think we should try to avoid modifying files after they have been
>>> copied to the store, but if doing this substitution earlier is
>>> difficult I guess it's okay with a comment.
>>
>> No, I just put it there by default, but I can see why doing the
>> substitution earlier would be better. I've sent another patch that
>> moves it to after the unpack phase.
>
> Applied, thank you! My rationale was that the store may be on slow
> storage (say NFS), whereas the build directory is probably a tmpfs
> or local storage.
>
> Note: I replaced the "find-files" invocation with just the one file
> path. Hope that was okay!
Yep, looks good. Thanks for your review :)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 858 bytes --]
next prev parent reply other threads:[~2017-05-18 18:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 6:47 bug#26770: [PATCH] gnu: tailon: Add missing inputs Christopher Baines
2017-05-05 16:33 ` Marius Bakke
2017-05-15 6:25 ` Christopher Baines
2017-05-15 6:11 ` bug#26770: [PATCH] gnu: tailon: Use absolute paths for commands Christopher Baines
2017-05-15 15:59 ` Marius Bakke
2017-05-16 19:49 ` Christopher Baines
2017-05-17 14:53 ` Marius Bakke
2017-05-18 18:50 ` Christopher Baines [this message]
2017-05-16 19:40 ` Christopher Baines
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bd3f0095-de16-60c7-c649-4d4b89a9ad9f@cbaines.net \
--to=mail@cbaines.net \
--cc=26770-done@debbugs.gnu.org \
--cc=mbakke@fastmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.