tokuhirom / Minilla

Authorizing tool for CPAN modules
https://metacpan.org/release/Minilla
Other
97 stars 65 forks source link

GIT_CONFIG env variable causes build failure #211

Closed bpj closed 7 years ago

bpj commented 7 years ago

I had persistent test failures with filegatherer.t. Relevant files attached. Eventually I understood that the problem was with git and tried the following which worked

env GIT_CONFIG="" cpanm Minilla

Clearly you need to unset $ENV{GIT_CONFIG} somewhere or other. I couldn't find where, so I hope you can with the help of the build log.

bpj-gitconfig.zip

syohex commented 7 years ago

Some other tests are failed by setting GIT_CONFIG environment variable. But filegatherer.t is not failed on my environment.

% unzip bpj-gitconfig.zip
Archive:  bpj-gitconfig.zip
  inflating: bpj-build.log           
  inflating: bpj-cpanm-version       
  inflating: bpj-gitconfig           
  inflating: bpj-perl-version        
% env GIT_CONFIG=$PWD/bpj-gitconfig prove -bv t/filegatherer.t
t/filegatherer.t .. 
ok 1 - Minilla::FileGatherer->can('new')
# Subtest: FileGatherer
[0CcLJ90tCK] $ git init
Initialized empty Git repository in /tmp/0CcLJ90tCK/.git/
[0CcLJ90tCK] $ git add .
[0CcLJ90tCK] $ git commit -m submodule
[master (root-commit) 126c879] submodule
 1 file changed, 1 insertion(+)
 create mode 100644 foo.c
[gvA3fX6aLy] $ git init
Initialized empty Git repository in /tmp/gvA3fX6aLy/.git/
[gvA3fX6aLy] $ git add .
[gvA3fX6aLy] $ git commit -m submodule
[master (root-commit) 86d7560] submodule
 1 file changed, 1 insertion(+)
 create mode 100644 bar.c
[lxSpMGybIu] $ git init
Initialized empty Git repository in /tmp/lxSpMGybIu/.git/
[lxSpMGybIu] $ git add .
[lxSpMGybIu] $ git submodule add file:///tmp/gvA3fX6aLy libbar
Cloning into '/tmp/lxSpMGybIu/libbar'...
[lxSpMGybIu] $ git submodule add file:///tmp/0CcLJ90tCK libfoo
Cloning into '/tmp/lxSpMGybIu/libfoo'...
[lxSpMGybIu] $ git commit -m foo
[master (root-commit) f53ede0] foo
 12 files changed, 17 insertions(+)
 create mode 100644 .dot/dot
 create mode 100644 .gitignore
 create mode 100644 .gitmodules
 create mode 100644 META.json
 create mode 100644 README
 create mode 100644 extlib/lib/Foo.pm
 create mode 100644 foo
 create mode 160000 libbar
 create mode 160000 libfoo
 create mode 100644 local/foo
 create mode 100644 xtra/.dot
 create mode 100644 xtra/.dotdir/dot
    # Subtest: normal
        ok 1
        1..1
    ok 1 - normal
    # Subtest: include_dotfiles
        ok 1
        1..1
    ok 2 - include_dotfiles
    # Subtest: MANIFEST.SKIP
[lxSpMGybIu] $ git init
Reinitialized existing Git repository in /tmp/lxSpMGybIu/.git/
[lxSpMGybIu] $ git add .
[lxSpMGybIu] $ git commit -m initial import
[master 0cfe9ec] initial import
 1 file changed, 1 insertion(+)
 create mode 100644 MANIFEST.SKIP
        ok 1
        1..1
    ok 3 - MANIFEST.SKIP
    1..3
ok 2 - FileGatherer
1..2
ok
All tests successful.
Files=1, Tests=2,  1 wallclock secs ( 0.04 usr  0.01 sys +  0.24 cusr  0.06 csys =  0.35 CPU)
Result: PASS
tokuhirom commented 7 years ago

Should we make git related tests as AUTHOR_TESTs?

On Jan 7, 2017 1:47 PM, "Syohei YOSHIDA" notifications@github.com wrote:

Some other tests are failed by setting GIT_CONFIG environment variable. But filegatherer.t is not failed on my environment.

% unzip bpj-gitconfig.zip Archive: bpj-gitconfig.zip inflating: bpj-build.log inflating: bpj-cpanm-version inflating: bpj-gitconfig inflating: bpj-perl-version % env GIT_CONFIG=$PWD/bpj-gitconfig prove -bv t/filegatherer.t t/filegatherer.t .. ok 1 - Minilla::FileGatherer->can('new')

Subtest: FileGatherer

[0CcLJ90tCK] $ git init Initialized empty Git repository in /tmp/0CcLJ90tCK/.git/ [0CcLJ90tCK] $ git add . [0CcLJ90tCK] $ git commit -m submodule [master (root-commit) 126c879] submodule 1 file changed, 1 insertion(+) create mode 100644 foo.c [gvA3fX6aLy] $ git init Initialized empty Git repository in /tmp/gvA3fX6aLy/.git/ [gvA3fX6aLy] $ git add . [gvA3fX6aLy] $ git commit -m submodule [master (root-commit) 86d7560] submodule 1 file changed, 1 insertion(+) create mode 100644 bar.c [lxSpMGybIu] $ git init Initialized empty Git repository in /tmp/lxSpMGybIu/.git/ [lxSpMGybIu] $ git add . [lxSpMGybIu] $ git submodule add file:///tmp/gvA3fX6aLy libbar Cloning into '/tmp/lxSpMGybIu/libbar'... [lxSpMGybIu] $ git submodule add file:///tmp/0CcLJ90tCK libfoo Cloning into '/tmp/lxSpMGybIu/libfoo'... [lxSpMGybIu] $ git commit -m foo [master (root-commit) f53ede0] foo 12 files changed, 17 insertions(+) create mode 100644 .dot/dot create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 META.json create mode 100644 README create mode 100644 extlib/lib/Foo.pm create mode 100644 foo create mode 160000 libbar create mode 160000 libfoo create mode 100644 local/foo create mode 100644 xtra/.dot create mode 100644 xtra/.dotdir/dot

Subtest: normal

    ok 1
    1..1
ok 1 - normal
# Subtest: include_dotfiles
    ok 1
    1..1
ok 2 - include_dotfiles
# Subtest: MANIFEST.SKIP

[lxSpMGybIu] $ git init Reinitialized existing Git repository in /tmp/lxSpMGybIu/.git/ [lxSpMGybIu] $ git add . [lxSpMGybIu] $ git commit -m initial import [master 0cfe9ec] initial import 1 file changed, 1 insertion(+) create mode 100644 MANIFEST.SKIP ok 1 1..1 ok 3 - MANIFEST.SKIP 1..3 ok 2 - FileGatherer 1..2 ok All tests successful. Files=1, Tests=2, 1 wallclock secs ( 0.04 usr 0.01 sys + 0.24 cusr 0.06 csys = 0.35 CPU) Result: PASS

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tokuhirom/Minilla/issues/211#issuecomment-271062814, or mute the thread https://github.com/notifications/unsubscribe-auth/AABSXJtZ97VzZzmcdfAct4Ez-GU9rnEwks5rPxjogaJpZM4Lc1Dt .

skaji commented 7 years ago

I suspect you globally ignore foo. or bar..

bpj commented 7 years ago

@syohex maybe it would still make sense to unset env GIT_CONFIG in that particular test. FWIW I didn't get any other error from zapping it.

@skaji No but I did globaly ignore a lot of LaTeX related extensions. I guess one of them is the suspect. I'll make it a remote and pull it on a per-repo basis in the future! Probably I threw that long list in there in a moment of frustration. :-)

syohex commented 7 years ago

I have released new version v3.0.9.

bpj commented 7 years ago

My problem persists. FYI unset GIT_CONFIG does not solve the problem, env GIT_CONFIG="" does solve it. My guess is that you need to set it to an empty string in the specific tests concerned.

syohex commented 7 years ago

I cannot reproduce. All tests are passed when GIT_CONFIG is set. Please skip tests like cpanm -n Minilla if you still have problems.