guix-patches
[Top][All Lists]
Advanced

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

bug#26770: [PATCH] gnu: tailon: Use absolute paths for commands.


From: Marius Bakke
Subject: bug#26770: [PATCH] gnu: tailon: Use absolute paths for commands.
Date: Wed, 17 May 2017 16:53:45 +0200
User-agent: Notmuch/0.24.1 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu)

Christopher Baines <address@hidden> writes:

> On Mon, 15 May 2017 17:59:42 +0200
> Marius Bakke <address@hidden> wrote:
>
>> Christopher Baines <address@hidden> 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!

Attachment: signature.asc
Description: PGP signature


reply via email to

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