From: Marius Bakke <mbakke@fastmail.com>
To: YOANN P <yoann_mac_donald@hotmail.com>, 31016@debbugs.gnu.org
Subject: [bug#31016] [PATCH] gnu: git: Fix checksum patch in 'patch-tests'.
Date: Tue, 03 Apr 2018 12:42:55 +0200 [thread overview]
Message-ID: <87h8osbmfk.fsf@fastmail.com> (raw)
In-Reply-To: <DB6P18901MB002290D26A0CEE6A0BF33D3ADBA70@DB6P18901MB0022.EURP189.PROD.OUTLOOK.COM>
[-- Attachment #1: Type: text/plain, Size: 1948 bytes --]
Hi Yoann,
YOANN P <yoann_mac_donald@hotmail.com> writes:
> Hi Guix Team,
>
> First contribution to Guix project so i hope i forgot nothing in the process to submit my patch.
> There is already some patchs for "t/t9100-git-svn-basic.sh" and "t/t9300-fast-import.sh" but they
> 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
> 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!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2018-04-03 10:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-01 15:03 [bug#31016] [PATCH] gnu: git: Fix checksum patch in 'patch-tests' YOANN P
2018-04-03 10:42 ` Marius Bakke [this message]
2018-04-03 18:05 ` YOANN P
2018-04-06 18:22 ` bug#31016: " Marius Bakke
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=87h8osbmfk.fsf@fastmail.com \
--to=mbakke@fastmail.com \
--cc=31016@debbugs.gnu.org \
--cc=yoann_mac_donald@hotmail.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.