Skip Menu |
 

This queue is for tickets about the Stow CPAN distribution.

Report information
The Basics
Id: 129944
Status: open
Priority: 0/
Queue: Stow

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: System perl used in tests (v2.3.0)
It seems that t/cli.t calls scripts which run with the first perl found in the user's PATH (usually the system perl), not with the perl used for the build: ... Can't locate Clone/Choose.pm in @INC (you may need to install the Clone::Choose module) (@INC contains: /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/lib /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/arch bin t /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at bin/stow line 467, <DATA> line 22. BEGIN failed--compilation aborted at bin/stow line 467, <DATA> line 22. # Failed test '--help should return 0 exit code' # at t/cli.t line 63. # got: '512' # expected: '0' # Failed test 'unrecognised option should return 1 exit code' # at t/cli.t line 66. # got: '2' # expected: '1' # Failed test 'unrecognised option should be listed' # at t/cli.t line 67. # 'Can't locate Clone/Choose.pm in @INC (you may need to install the Clone::Choose module) (@INC contains: /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/lib /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/arch bin t /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at bin/stow line 467, <DATA> line 22. # BEGIN failed--compilation aborted at bin/stow line 467, <DATA> line 22. # ' # doesn't match '(?^m:^Unknown option: foo$)' # Looks like you failed 3 tests of 3. t/cli.t .................... Dubious, test returned 3 (wstat 768, 0x300) Failed 3/3 subtests ... Possible fixes are to use the version of the script in blib/script, as it has already the correct shebang there, or to explicitly call the script with $^X. Also, it seems that Clone::Choose is not declared as a prereq.
Subject: Re: [rt.cpan.org #129944] System perl used in tests (v2.3.0)
Date: Sat, 29 Jun 2019 11:14:36 +0100
To: bug-Stow [...] rt.cpan.org
From: Adam Spiers <cpan [...] adamspiers.org>
Download (untitled) / with headers
text/plain 2.8k
On Sat, 29 Jun 2019 at 05:56, Slaven_Rezic via RT <bug-Stow@rt.cpan.org> wrote: Show quoted text
> It seems that t/cli.t calls scripts which run with the first perl found in the user's PATH (usually the system perl), not with the perl used for the build:
Maybe I'm missing something, but I'm fairly sure that's not true. t/*.t are never meant to be run directly, so their #! line is irrelevant. They are supposed to be run via "make test" or "./Build test". And Makefile.am has: TESTS_ENVIRONMENT = $(PERL) -Ibin -Ilib -I$(TESTS_DIR) and configure.ac has: AC_PATH_PROGS([PERL], [perl] [perl5], [false]) Show quoted text
> ... > Can't locate Clone/Choose.pm in @INC (you may need to install the Clone::Choose module) (@INC contains: /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/lib /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/arch bin t /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at bin/stow line 467, <DATA> line 22. > BEGIN failed--compilation aborted at bin/stow line 467, <DATA> line 22. > > # Failed test '--help should return 0 exit code' > # at t/cli.t line 63. > # got: '512' > # expected: '0' > > # Failed test 'unrecognised option should return 1 exit code' > # at t/cli.t line 66. > # got: '2' > # expected: '1' > > # Failed test 'unrecognised option should be listed' > # at t/cli.t line 67. > # 'Can't locate Clone/Choose.pm in @INC (you may need to install the Clone::Choose module) (@INC contains: /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/lib /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/arch bin t /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at bin/stow line 467, <DATA> line 22. > # BEGIN failed--compilation aborted at bin/stow line 467, <DATA> line 22. > # ' > # doesn't match '(?^m:^Unknown option: foo$)' > # Looks like you failed 3 tests of 3. > t/cli.t .................... > Dubious, test returned 3 (wstat 768, 0x300) > Failed 3/3 subtests > ...
I saw this exact issue during testing with Docker, but it turned out to be due to an old Docker image which did not have the CPAN dependencies installed correctly. Show quoted text
> Possible fixes are to use the version of the script in blib/script, as it has already the correct shebang there, or to explicitly call the script with $^X.
As per above I'm not sure why that would help. Show quoted text
> Also, it seems that Clone::Choose is not declared as a prereq.
It should not need to be, because it's a dependency of Hash::Merge as shown by https://metacpan.org/pod/Hash::Merge
RT-Send-CC: cpan [...] adamspiers.org
Download (untitled) / with headers
text/plain 3.4k
On 2019-06-29 06:15:05, ASPIERS wrote: Show quoted text
> On Sat, 29 Jun 2019 at 05:56, Slaven_Rezic via RT <bug- > Stow@rt.cpan.org> wrote:
> > It seems that t/cli.t calls scripts which run with the first perl > > found in the user's PATH (usually the system perl), not with the perl > > used for the build:
> > Maybe I'm missing something, but I'm fairly sure that's not true. > t/*.t are never meant to be run directly, so their #! line is > irrelevant. They are supposed to be run via "make test" or "./Build > test". And Makefile.am has: > > TESTS_ENVIRONMENT = $(PERL) -Ibin -Ilib -I$(TESTS_DIR) > > and configure.ac has: > > AC_PATH_PROGS([PERL], [perl] [perl5], [false]) >
I don't mean how the test scripts are run. I mean that the test scripts probably call external perl scripts, and here it matters if $^X or "perl" is used. Show quoted text
> > ... > > Can't locate Clone/Choose.pm in @INC (you may need to install the > > Clone::Choose module) (@INC contains: > > /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/lib > > /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/arch > > bin t /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 > > /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 > > /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 > > /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux- > > gnu/perl-base .) at bin/stow line 467, <DATA> line 22. > > BEGIN failed--compilation aborted at bin/stow line 467, <DATA> line > > 22. > > > > # Failed test '--help should return 0 exit code' > > # at t/cli.t line 63. > > # got: '512' > > # expected: '0' > > > > # Failed test 'unrecognised option should return 1 exit code' > > # at t/cli.t line 66. > > # got: '2' > > # expected: '1' > > > > # Failed test 'unrecognised option should be listed' > > # at t/cli.t line 67. > > # 'Can't locate Clone/Choose.pm in @INC (you may > > need to install the Clone::Choose module) (@INC contains: > > /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/lib > > /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/arch > > bin t /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 > > /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 > > /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 > > /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux- > > gnu/perl-base .) at bin/stow line 467, <DATA> line 22. > > # BEGIN failed--compilation aborted at bin/stow line 467, <DATA> line > > 22. > > # ' > > # doesn't match '(?^m:^Unknown option: foo$)' > > # Looks like you failed 3 tests of 3. > > t/cli.t .................... > > Dubious, test returned 3 (wstat 768, 0x300) > > Failed 3/3 subtests > > ...
> > I saw this exact issue during testing with Docker, but it turned out > to be due to an old Docker image which did not have the CPAN > dependencies installed correctly. >
> > Possible fixes are to use the version of the script in blib/script, > > as it has already the correct shebang there, or to explicitly call > > the script with $^X.
> > As per above I'm not sure why that would help. >
> > Also, it seems that Clone::Choose is not declared as a prereq.
> > It should not need to be, because it's a dependency of Hash::Merge as > shown by https://metacpan.org/pod/Hash::Merge
According to Hash::Merge's Changelog Clone::Chosoe is a dependency since (stable) 0.298. If an older Hash::Merge is already installed (and you don't specify a minimum version), then Clone::Choose may be missing.
CC: ;
Subject: Re: [rt.cpan.org #129944] System perl used in tests (v2.3.0)
Date: Mon, 15 Jul 2019 16:21:45 -0400
To: Slaven_Rezic via RT <bug-Stow [...] rt.cpan.org>
From: Adam Spiers <cpan [...] adamspiers.org>
Download (untitled) / with headers
text/plain 901b
On Wed, Jul 03, 2019 at 01:52:00AM -0400, Slaven_Rezic via RT wrote: Show quoted text
>I don't mean how the test scripts are run. I mean that the test scripts probably call external perl scripts, and here it matters if $^X or "perl" is used.
Ah, good catch - thanks! I've proposed a fix: https://github.com/aspiers/stow/pull/62 Please can you review? Show quoted text
>> > Also, it seems that Clone::Choose is not declared as a prereq.
>> >> It should not need to be, because it's a dependency of Hash::Merge as >> shown by https://metacpan.org/pod/Hash::Merge
> >According to Hash::Merge's Changelog Clone::Chosoe is a dependency since (stable) 0.298. If an older Hash::Merge is already installed (and you don't specify a minimum version), then Clone::Choose may be missing.
These new dependencies have already been reverted so this is effectively fixed and will be in the next release: https://github.com/aspiers/stow/pull/60


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.