From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael Haggerty <mhagger@alum.mit.edu>, git@vger.kernel.org
Subject: Re: [PATCH] t0090: mark add-interactive test with PERL prerequisite
Date: Tue, 18 Nov 2014 12:43:09 -0500 [thread overview]
Message-ID: <20141118174309.GB31672@peff.net> (raw)
In-Reply-To: <20141118172231.GA16387@peff.net>
On Tue, Nov 18, 2014 at 12:22:31PM -0500, Jeff King wrote:
> The add-interactive system is built in perl. If you build
> with NO_PERL, running "git commit --interactive" will exit
> with an error and the test will fail.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> Noticed by Michael while working around gitweb failures by setting
> NO_PERL. :)
>
> It didn't reproduce for me in my existing build directory, presumably
> because I had an old git-add--interactive build product lying around.
> But running the tests in a clean clone with NO_PERL set reproduces
> easily.
I don't think fixing this is really a high priority. You can't ever be
free of odd interactions with previous build artifacts. After all, you
might have a built "git-foo" from a previous version of git (or one from
the future, or even an alternate reality from another branch), and our
Makefile should not have to know about every previous version you may
have built in the path. That is what "git clean" is for (or just using a
clean build directory).
But fixing this one in particular is pretty easy (and we _do_ know about
the wrongly-built file; our dependencies are just incomplete):
-- >8 --
Subject: Makefile: have perl scripts depend on NO_PERL setting
If NO_PERL is not set, our perl scripts are built as
usual. If it is set, then we build "dummy" versions that
tell you git was built without perl support and exit
gracefully.
However, if you switch to NO_PERL in a directory with
existing build artifacts, we do not notice that the files
need rebuilt. We see only that they are newer than the
"unimplemented.sh" wrapper and assume they are done. So
doing:
make
make NO_PERL=Nope
would result in a git-add--interactive script that uses perl
(and running the test suite would make use of it).
Instead, we should trigger a rebuild of the perl scripts
anytime NO_PERL changes.
Signed-off-by: Jeff King <peff@peff.net>
---
Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Makefile b/Makefile
index 827006b..0fa02ff 100644
--- a/Makefile
+++ b/Makefile
@@ -1676,6 +1676,9 @@ git.res: git.rc GIT-VERSION-FILE
$(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
+# This makes sure we depend on the NO_PERL setting itself.
+$(patsubst %.perl,%,$(SCRIPT_PERL)): GIT-BUILD-OPTIONS
+
ifndef NO_PERL
$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
--
2.1.2.596.g7379948
next prev parent reply other threads:[~2014-11-18 17:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 17:22 [PATCH] t0090: mark add-interactive test with PERL prerequisite Jeff King
2014-11-18 17:29 ` [PATCH] t960[34]: mark cvsimport tests as requiring perl Jeff King
2014-11-18 18:56 ` Jonathan Nieder
2014-11-18 19:15 ` Jeff King
2014-11-18 17:43 ` Jeff King [this message]
2014-11-18 18:38 ` [PATCH] t0090: mark add-interactive test with PERL prerequisite Jonathan Nieder
2014-11-18 18:43 ` Jonathan Nieder
2014-11-18 18:49 ` Jeff King
2014-11-18 23:10 ` Pete Wyckoff
2014-11-18 18:44 ` Jeff King
2014-11-18 18:51 ` Jonathan Nieder
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=20141118174309.GB31672@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
/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.
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.