From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3JQ8-0005DI-0a for guix-patches@gnu.org; Tue, 03 Apr 2018 06:44:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f3JQ2-0006Kc-7h for guix-patches@gnu.org; Tue, 03 Apr 2018 06:44:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56218) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f3JQ2-0006KQ-1C for guix-patches@gnu.org; Tue, 03 Apr 2018 06:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f3JQ1-0002nG-Ko for guix-patches@gnu.org; Tue, 03 Apr 2018 06:44:01 -0400 Subject: [bug#31016] [PATCH] gnu: git: Fix checksum patch in 'patch-tests'. Resent-Message-ID: From: Marius Bakke In-Reply-To: References: Date: Tue, 03 Apr 2018 12:42:55 +0200 Message-ID: <87h8osbmfk.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: YOANN P , 31016@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Yoann, YOANN P writes: > Hi Guix Team, > > First contribution to Guix project so i hope i forgot nothing in the proc= ess to submit my patch. > There is already some patchs for "t/t9100-git-svn-basic.sh" and "t/t9300-= fast-import.sh" but they=20 > assume than the store is always "/gnu/store". > The bellow patch is intend to correct this and lets the check phase work = the same way if a custom=20 > store is used. Thank you for this patch! [...] > * gnu/packages/version-control.scm (git)[arguments]: In 'patch-tests' > phase, use %store-directory instead of '/gnu' to prevent tests failure > in case a custom store path is used. [...] > @@ -238,10 +238,10 @@ as well as the classic centralized workflow.") > (("\tcommit_template_commented") "\ttrue")) > ;; More checksum mismatches due to odd shebangs. > (substitute* "t/t9100-git-svn-basic.sh" > - (("\"#!/gnu.*/bin/sh") "\"#!/bin/sh")) > + (((string-append "\"#!" (%store-directory) ".*/bin/sh")) "= \"#!/bin/sh") ) > (substitute* "t/t9300-fast-import.sh" > - (("\t#!/gnu.*/bin/sh") "\t#!/bin/sh") > - (("'#!/gnu.*/bin/sh") "'#!/bin/sh")) > + (((string-append "\t#!" (%store-directory) ".*/bin/sh")) "= \t#!/bin/sh") > + (((string-append "'#!" (%store-directory) ".*/bin/sh")) "'= #!/bin/sh")) Calling out to (%store-directory) inside a string substitution multiple times is not great. Can you try wrapping this phase in a let binding that expands (%store-directory) once, and use that? Something along the lines of: (add-before 'check 'patch-tests (lambda _ (let ((store-directory (%store-directory))) [...] (string-append "..." store-directory ".*/bin/sh")))) We'll have to reindent it, but that's okay. Can you send an updated patch? Thanks in advance, and welcome! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlrDWq8ACgkQoqBt8qM6 VPrtYwf+IZVum6Yvio41zvYAtY45ID7WXYqNKwyfDZlWiyAKzEnqOXP2PJ4CiRiT NuhMlbyR8Uwp4xHm8cOXgclcMbBZm8Hzwku/WWuuGkKQU7QtGoG75Ybh7cYdrdOv 4GTSpeWGwNfsm9hlHBA9kGf6REmrd6RfRpNs7Allfl5MoUv9yo1I9Y9r0QbP6GGV pkD8W2aNvkV2DGb2FCQjEzQb+lxG9u8HLdX65pbIlXd+hBcRPkWKjJymNDYSHuQh PaLxq9LHHvf/3YJabviTcb7+31Y+rcA+XrUVz37MxidDLu9dBwnrf+gcDb0ka14m cj0Km47Y7t4zLYMJ5z4k8qNrb75ndA== =0FOT -----END PGP SIGNATURE----- --=-=-=--