* git submodule add broken (2.11.0-rc1): Cannot open git-sh-i18n @ 2016-11-07 17:27 Anthony Sottile 2016-11-07 17:56 ` Stefan Beller 0 siblings, 1 reply; 4+ messages in thread From: Anthony Sottile @ 2016-11-07 17:27 UTC (permalink / raw) To: git Noticed as part of my automated tests here: https://travis-ci.org/pre-commit/pre-commit/jobs/173957051 Minimal reproduction: rm -rf /tmp/git /tmp/foo /tmp/bar git clone git://github.com/git/git --depth 1 /tmp/git pushd /tmp/git make -j 8 popd export PATH="/tmp/git:$PATH" git init /tmp/foo git init /tmp/bar cd /tmp/foo git submodule add /tmp/bar baz Output: $ rm -rf /tmp/git /tmp/foo /tmp/bar $ git clone git://github.com/git/git --depth 1 /tmp/git Cloning into '/tmp/git'... remote: Counting objects: 3074, done. remote: Compressing objects: 100% (2735/2735), done. remote: Total 3074 (delta 249), reused 1871 (delta 215), pack-reused 0 Receiving objects: 100% (3074/3074), 6.38 MiB | 905.00 KiB/s, done. Resolving deltas: 100% (249/249), done. Checking connectivity... done. $ pushd /tmp/git /tmp/git /tmp $ make -j 8 GIT_VERSION = 2.11.0-rc0 ... lots of make output ... $ popd /tmp $ export PATH="/tmp/git:$PATH" $ git init /tmp/foo warning: templates not found /home/asottile/share/git-core/templates Initialized empty Git repository in /tmp/foo/.git/ $ git init /tmp/bar warning: templates not found /home/asottile/share/git-core/templates Initialized empty Git repository in /tmp/bar/.git/ $ cd /tmp/foo $ git submodule add /tmp/bar baz /tmp/git/git-submodule: 46: .: Can't open /home/asottile/libexec/git-core/git-sh-i18n $ echo $? 2 Thanks Anthony ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git submodule add broken (2.11.0-rc1): Cannot open git-sh-i18n 2016-11-07 17:27 git submodule add broken (2.11.0-rc1): Cannot open git-sh-i18n Anthony Sottile @ 2016-11-07 17:56 ` Stefan Beller [not found] ` <CA+dzEBnDZGsYyZkSO5E+3EX+d1j7Kb4kiY6OkC0mtwaq5px5aQ@mail.gmail.com> 0 siblings, 1 reply; 4+ messages in thread From: Stefan Beller @ 2016-11-07 17:56 UTC (permalink / raw) To: Anthony Sottile; +Cc: git@vger.kernel.org $ git --version git version 1.8.5.6 $ if [ "$LATEST_GIT" = "1" ]; then ... export PATH="/tmp/git:$PATH" fi .... make -j 8 ... $ git --version git version 2.11.0-rc0 So you compile 2.11.0-rc0 yourself, but you do not install it, instead the $PATH is pointed to /tmp/git instead, however the later calls fail with: Can't open /home/travis/libexec/git-core/git-sh-i18n which is where 1.8.5.6 is installed. So you're running into an internationalization problem between 2 very different versions of Git (1.8 seems to be ancient) Not sure if i can offer advice except from "Don't do that, instead install Git properly". ;) Thanks, Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CA+dzEBnDZGsYyZkSO5E+3EX+d1j7Kb4kiY6OkC0mtwaq5px5aQ@mail.gmail.com>]
* Re: git submodule add broken (2.11.0-rc1): Cannot open git-sh-i18n [not found] ` <CA+dzEBnDZGsYyZkSO5E+3EX+d1j7Kb4kiY6OkC0mtwaq5px5aQ@mail.gmail.com> @ 2016-11-07 18:34 ` Stefan Beller 2016-11-08 21:31 ` Junio C Hamano 0 siblings, 1 reply; 4+ messages in thread From: Stefan Beller @ 2016-11-07 18:34 UTC (permalink / raw) To: Anthony Sottile; +Cc: git@vger.kernel.org On Mon, Nov 7, 2016 at 10:30 AM, Anthony Sottile <asottile@umich.edu> wrote: > This has worked great up until now (and is very convenient for trying things > out without blowing away the system installation). What changed? > (Just guessing myself:) $ git log --grep git-sh-i18n v2.10.0..v2.11.0-rc0 commit da14d73d5eacfb2fa9d054f94d9eecb2244c3ce5 Merge: 2f445c17e5 1073094f30 Author: Junio C Hamano <gitster@pobox.com> Date: Mon Oct 31 13:15:25 2016 -0700 Merge branch 'ak/sh-setup-dot-source-i18n-fix' Recent update to git-sh-setup (a library of shell functions that are used by our in-tree scripted Porcelain commands) included another shell library git-sh-i18n without specifying where it is, relying on the $PATH. This has been fixed to be more explicit by prefixing $(git --exec-path) output in front. * ak/sh-setup-dot-source-i18n-fix: git-sh-setup: be explicit where to dot-source git-sh-i18n from. commit 1073094f30a8dd5ae49f2146f587085c4fe86410 Author: Anders Kaseorg <andersk@mit.edu> Date: Sat Oct 29 22:10:02 2016 -0400 git-sh-setup: be explicit where to dot-source git-sh-i18n from. d323c6b641 ("i18n: git-sh-setup.sh: mark strings for translation", 2016-06-17) started to dot-source git-sh-i18n shell script library, assuming that $PATH is already adjusted for our scripts, namely, $GIT_EXEC_PATH is at the beginning of $PATH. Old contrib scripts like contrib/convert-grafts-to-replace-refs.sh and contrib/rerere-train.sh and third-party scripts like guilt may however be using this as ". $(git --exec-path)/git-sh-setup", without satisfying that assumption. Be more explicit by specifying its path prefixed with "$(git --exec-path)/". to be safe. While we’re here, move the sourcing of git-sh-i18n below the shell portability fixes. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git submodule add broken (2.11.0-rc1): Cannot open git-sh-i18n 2016-11-07 18:34 ` Stefan Beller @ 2016-11-08 21:31 ` Junio C Hamano 0 siblings, 0 replies; 4+ messages in thread From: Junio C Hamano @ 2016-11-08 21:31 UTC (permalink / raw) To: Stefan Beller; +Cc: Anthony Sottile, git@vger.kernel.org Stefan Beller <sbeller@google.com> writes: > On Mon, Nov 7, 2016 at 10:30 AM, Anthony Sottile <asottile@umich.edu> wrote: >> This has worked great up until now (and is very convenient for trying things >> out without blowing away the system installation). What changed? >> > > (Just guessing myself:) > > $ git log --grep git-sh-i18n v2.10.0..v2.11.0-rc0 > ... > commit 1073094f30a8dd5ae49f2146f587085c4fe86410 > Author: Anders Kaseorg <andersk@mit.edu> > Date: Sat Oct 29 22:10:02 2016 -0400 > > git-sh-setup: be explicit where to dot-source git-sh-i18n from. > > d323c6b641 ("i18n: git-sh-setup.sh: mark strings for translation", > 2016-06-17) started to dot-source git-sh-i18n shell script library, > assuming that $PATH is already adjusted for our scripts, namely, > $GIT_EXEC_PATH is at the beginning of $PATH. > ... Before that one since v2.10.0, there ie d323c6b641 that starts to include git-sh-i18n from git-sh-setup in the first place. If you are testing or using a newly-out-of-oven uninstalled Git, you would need to do these to be correctly using it: * Many subcommand executables and helpers are not installed on any directory on your $PATH, but are installed in GIT_EXEC_PATH. Find out where it is by asking the newly-out-of-oven Git "git --exec-path" without setting GIT_EXEC_PATH environment variable. That is where your newly built one wants to find things. * Because you are trying to use the newly-out-of-oven Git without installing, you do not want to install into the real GIT_EXEC_PATH location yet. Pick a new empty directory and arrange the files that would be installed by our Makefile into "git --exec-path" if you did "make install" to be in this new location. The set of files include git-sh-setup and git-sh-i18n. * Set and export GIT_EXEC_PATH to point at this new empty directory you just populated. That incidentally is how we make our "make test" work. If you only set $PATH to the top of git build directory, without doing the above arrangement with GIT_EXEC_PATH, things may have appeared to work due to multitude of accidents. Builtin commands would worked fine because it is just a single "git" binary after all, i.e. "git log" would not have consulted a "git-log" binary on anywhere in your filesystem. Other commands may have been run from the already installed version on the system. The latter is particularly problematic, because it means that one thought that one is testing the newly built on before installing to make sure that the new one works OK, but is actually testing the already installed one. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-09 5:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-07 17:27 git submodule add broken (2.11.0-rc1): Cannot open git-sh-i18n Anthony Sottile
2016-11-07 17:56 ` Stefan Beller
[not found] ` <CA+dzEBnDZGsYyZkSO5E+3EX+d1j7Kb4kiY6OkC0mtwaq5px5aQ@mail.gmail.com>
2016-11-07 18:34 ` Stefan Beller
2016-11-08 21:31 ` Junio C Hamano
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.