From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAIPp-0005pN-N0 for guix-patches@gnu.org; Mon, 15 May 2017 12:00:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAIPj-00078I-J4 for guix-patches@gnu.org; Mon, 15 May 2017 12:00:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:44080) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dAIPj-00077D-9o for guix-patches@gnu.org; Mon, 15 May 2017 12:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dAIPi-0001KD-TG for guix-patches@gnu.org; Mon, 15 May 2017 12:00:02 -0400 Subject: bug#26770: [PATCH] gnu: tailon: Use absolute paths for commands. Resent-Message-ID: From: Marius Bakke In-Reply-To: <20170515061155.1380-1-mail@cbaines.net> References: <20170504064715.9779-1-mail@cbaines.net> <20170515061155.1380-1-mail@cbaines.net> Date: Mon, 15 May 2017 17:59:42 +0200 Message-ID: <87o9uuf6vl.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Christopher Baines , 26770@debbugs.gnu.org --=-=-= Content-Type: text/plain Christopher Baines writes: > * gnu/packages/logging.scm (tailon)[arguments]: Patch commands.py to reference > grep, awk, sed and tail by absolute paths. Thanks for this! [...] > + (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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlkZ0G4ACgkQoqBt8qM6 VPrDJwf9FbeXvpaba8qDRjZTl7G1Ko5JngZHMP/ZiD/x2kxZAqrnnDxIqiAWvFd0 YFFMmHmA6NvTGDTI4y8mwStjGHjLZdazEak2GvYQ4+pCsGngNdIFei2Z0+w62a54 jzx+P6hO8w2f0DAJSK/AhDL1tRCJz9h1l/Fq0eygDcWRdJP/sBEOgL3M+ZTGRl9Y qRLwm967p6mtSsm4F2GXFjeYRqRM/wK94jJcsfbLiEuL4LSA+W3wdmxkaBkJpHnt /q6Oh28RcaSouI27Tv0WIGa203V1RwSudA08Y2j/IT910eZGIoUabu7KGlgLhPc/ KrMIlMIOqTJnwM7eQui1Ao/nSMVryA== =LkGr -----END PGP SIGNATURE----- --=-=-=--