Skip Menu |
 

This queue is for tickets about the File-Path CPAN distribution.

Report information
The Basics
Id: 35761
Status: rejected
Priority: 0/
Queue: File-Path

People
Owner: dland [...] cpan.org
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in:
  • 2.05
  • 2.06
Fixed in: (no value)



Subject: File-Path 2.05 broke tests of Kwiki-Test 0.03
Download (untitled) / with headers
text/plain 252b
I have not yet figured out what exactly Kwiki::Test does but when I run its tests with File-Path 2.0[56] installed they fail and downgrading to File-Path-2.04 helps them pass. I tried this with maint-5.10 @33443 and @33787 and with bleadperl @33788.
On Sat May 10 03:45:14 2008, ANDK wrote: Show quoted text
> I have not yet figured out what exactly Kwiki::Test does but when I run > its tests with File-Path 2.0[56] installed they fail and downgrading to > File-Path-2.04 helps them pass. > > I tried this with maint-5.10 @33443 and @33787 and with bleadperl @33788.
Hmm, this is strange. The only real new code is to check whether the cwd is /path/to/dir and we're being asked to remove /path/to. But that should have already been causing the code to croak. Then again, perhaps the call was in an eval block, in which case it would have blown away the directory tree, but not known how to get back to the original cwd which is no longer there, and died. Now the code does not attempt to try to unlink anything if the cwd is below the directory to be removed, so something along these lines would be the sanest explanation. I had a quick look at the code to K::T, and I can't even see where it uses File::Path, apart from sub cleanup, that appears to use a 'rmtree' method, but I wasn't able to figure out where that was defined. Thanks for the report. Later, David
Download (untitled) / with headers
text/plain 836b
On Sat May 10 03:45:14 2008, ANDK wrote: Show quoted text
> I have not yet figured out what exactly Kwiki::Test does but when I run > its tests with File-Path 2.0[56] installed they fail and downgrading to > File-Path-2.04 helps them pass. > > I tried this with maint-5.10 @33443 and @33787 and with bleadperl @33788.
Ok, I've had a look at this. What's going on is that it's doing mkdir /subdir cd /subdir # stuff rmtree /subdir leaving the current working directory pointing to a directory that no longer exists. That's now illegal, because rmtree() manipulates the current working directory as it removes the tree and at the end it would try to restore the original working directory to a directory that no longer exists. The code in question ought to do something like chdir updir() or chdir '/some/safe/place' before removing /subdir David
Download (untitled) / with headers
text/plain 519b
Thanks for digging that out. Maybe this change alone warrants a 3.x? I haven't read the File::Path manpage for a while but today I discovered the old style / modern style stuff in it and no mention about when this change was implemented. I think this needs to be said somewhere and switching major version numbers at such points in time gives users a better chance to adapt their code to modern style. Thanks for doing all that, I've had my hands on File::Path many years ago and I recall it was quite a challenging.
Download (untitled) / with headers
text/plain 1.6k
On Tue May 13 02:32:16 2008, ANDK wrote: Show quoted text
> Thanks for digging that out. > > Maybe this change alone warrants a 3.x?
This is the change that warranted 2.x. Show quoted text
> I haven't read the File::Path manpage for a while but today I discovered > the old style / modern style stuff in it and no mention about when this > change was implemented. I think this needs to be said somewhere and > switching major version numbers at such points in time gives users a > better chance to adapt their code to modern style.
Well this is the funny thing. Another of the changes that went into 2.0 (which is why I bumped the major version) was less the modern/traditional API change and more the race prevention code that was first patched into Debian's version, and later made it to Suse, Red-Hat and which ever other platforms adopted Debian's patch (or was inspired by it). The release coincided with 5.10, and was dual-lifed at that time (or the months running up to it). Anyway, such smoke failures should have been occurring over the years on those platforms. But as far as I can tell they haven't. I dunno. Maybe I transcribed the patch incorrectly. I don't think so, but I don't have a better explanation. Anyway, it occurred to me today that I can restore pretty much the original behaviour by doing the removal, and then chdir'ing to updir() until I finally anchor the cwd in a real directory. It will mean that the process gets its cwd changed unexpectedly, but at least it winds up in a sane place. Show quoted text
> Thanks for doing all that, I've had my hands on File::Path many years > ago and I recall it was quite a challenging.
Yah, it's a bit of a bugger to work with, but interesting. Thanks, David
Download (untitled) / with headers
text/plain 166b
Tried to look at this ticket today, but couldn't get as far as Kwiki::Test due to build failures in prerequisites (https://rt.cpan.org/Ticket/Display.html?id=103763).
Download (untitled) / with headers
text/plain 1.3k
On Wed Apr 15 21:23:11 2015, JKEENAN wrote: Show quoted text
> Tried to look at this ticket today, but couldn't get as far as > Kwiki::Test due to build failures in prerequisites > (https://rt.cpan.org/Ticket/Display.html?id=103763).
Thanks to some help from SREZIC++, I got past those prerequisite failures and was able to test Kwiki::Test directly. The full log from 'cpanm --test-only Kwiki::Test' is attached. Important points: ##### cannot remove path when cwd is /home/jkeenan/.cpanm/work/1429225057.9699/Kwiki-Test-0.03/kwiki for /home/jke enan/.cpanm/work/1429225057.9699/Kwiki-Test-0.03/kwiki: at /home/jkeenan/perl5/lib/perl5/IO/All/Dir.pm line 202. ##### Here is the relevant section of IO::All::Dir: ##### 199 sub rmtree { 200 my $self = shift; 201 require File::Path; 202 File::Path::rmtree($self->pathname, @_); 203 } 204 ##### Back to the build.log: ##### Subroutine Kwiki::Test::io redefined at /home/jkeenan/perl5/lib/perl5/IO/All/Base.pm line 25. unable to mkdir /home/jkeenan/.cpanm/work/1429225057.9699/Kwiki-Test-0.03/kwiki Can't make new Kwiki in a non-empty directory # Looks like your test exited with 255 before it could output anything. t/pages.t .......... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 7/7 subtests ##### Got that "Can't make new Kwiki in a non-empty directory" for each of 3 test files. Thank you very much. Jim Keenan
Subject: kwiki.test.build.log
cpanm (App::cpanminus) 1.7014 on perl 5.020001 built for x86_64-linux Work directory is /home/jkeenan/.cpanm/work/1429225057.9699 You have make /usr/bin/make You have LWP 6.07 You have /bin/tar: tar (GNU tar) 1.27.1 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. You have /usr/bin/unzip Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.02) Checking if you have ExtUtils::Install 1.46 ... Yes (1.67) Searching Kwiki::Test on cpanmetadb ... --> Working on Kwiki::Test Fetching http://www.cpan.org/authors/id/C/CD/CDENT/Kwiki/Kwiki-Test-0.03.tar.gz -> OK Unpacking Kwiki-Test-0.03.tar.gz Entering Kwiki-Test-0.03 Checking configure dependencies from META.yml Configuring Kwiki-Test-0.03 Running Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Kwiki::Test Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.02) Checking if you have Kwiki 0.37 ... Yes (0.39) Building and testing Kwiki-Test-0.03 cp lib/Kwiki/Test.pm blib/lib/Kwiki/Test.pm Manifying 1 pod document PERL_DL_NONLAZY=1 "/home/jkeenan/perl5/perlbrew/perls/perl-5.20.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t Subroutine Kwiki::Test::io redefined at /home/jkeenan/perl5/lib/perl5/IO/All/Base.pm line 25. Kwiki software installed! Point your browser at this location. cannot remove path when cwd is /home/jkeenan/.cpanm/work/1429225057.9699/Kwiki-Test-0.03/kwiki for /home/jkeenan/.cpanm/work/1429225057.9699/Kwiki-Test-0.03/kwiki: at /home/jkeenan/perl5/lib/perl5/IO/All/Dir.pm line 202. t/makes-system.t ... ok Subroutine Kwiki::Test::io redefined at /home/jkeenan/perl5/lib/perl5/IO/All/Base.pm line 25. unable to mkdir /home/jkeenan/.cpanm/work/1429225057.9699/Kwiki-Test-0.03/kwiki Can't make new Kwiki in a non-empty directory # Looks like your test exited with 255 before it could output anything. t/pages.t .......... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 7/7 subtests Subroutine Kwiki::Test::io redefined at /home/jkeenan/perl5/lib/perl5/IO/All/Base.pm line 25. unable to mkdir /home/jkeenan/.cpanm/work/1429225057.9699/Kwiki-Test-0.03/kwiki Can't make new Kwiki in a non-empty directory # Looks like your test exited with 255 before it could output anything. t/simple_hook.t .... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 3/3 subtests Subroutine Kwiki::Test::io redefined at /home/jkeenan/perl5/lib/perl5/IO/All/Base.pm line 25. unable to mkdir /home/jkeenan/.cpanm/work/1429225057.9699/Kwiki-Test-0.03/kwiki Can't make new Kwiki in a non-empty directory # Looks like your test exited with 255 before it could output anything. t/simple_widget.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 2/2 subtests Test Summary Report ------------------- t/pages.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 7 tests but ran 0. t/simple_hook.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 3 tests but ran 0. t/simple_widget.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 0. Files=4, Tests=6, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.29 cusr 0.02 csys = 0.33 CPU) Result: FAIL Failed 3/4 test programs. 0/6 subtests failed. make: *** [test_dynamic] Error 255 -> FAIL Testing Kwiki::Test failed. See /home/jkeenan/.cpanm/work/1429225057.9699/build.log for details. Retry with --force to force install it.
Download (untitled) / with headers
text/plain 2.1k
On Thu Apr 16 19:08:23 2015, JKEENAN wrote: Show quoted text
> On Wed Apr 15 21:23:11 2015, JKEENAN wrote:
> > Tried to look at this ticket today, but couldn't get as far as > > Kwiki::Test due to build failures in prerequisites > > (https://rt.cpan.org/Ticket/Display.html?id=103763).
> > Thanks to some help from SREZIC++, I got past those prerequisite > failures and was able to test Kwiki::Test directly. The full log from > 'cpanm --test-only Kwiki::Test' is attached. Important points: > > ##### > cannot remove path when cwd is > /home/jkeenan/.cpanm/work/1429225057.9699/Kwiki-Test-0.03/kwiki for > /home/jke > enan/.cpanm/work/1429225057.9699/Kwiki-Test-0.03/kwiki: at > /home/jkeenan/perl5/lib/perl5/IO/All/Dir.pm line > 202. > ##### > > Here is the relevant section of IO::All::Dir: > > ##### > 199 sub rmtree { > 200 my $self = shift; > 201 require File::Path; > 202 File::Path::rmtree($self->pathname, @_); > 203 } > 204 > ##### > > Back to the build.log: > > ##### > Subroutine Kwiki::Test::io redefined at > /home/jkeenan/perl5/lib/perl5/IO/All/Base.pm line 25. > unable to mkdir /home/jkeenan/.cpanm/work/1429225057.9699/Kwiki-Test- > 0.03/kwiki > Can't make new Kwiki in a non-empty directory > # Looks like your test exited with 255 before it could output > anything. > t/pages.t .......... > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 7/7 subtests > ##### > > Got that "Can't make new Kwiki in a non-empty directory" for each of 3 > test files. > > Thank you very much. > Jim Keenan
I'm classifying this ticket as Stalled because I am not currently able to get far enough in building/installing Kwiki::Test to see whether it still has a problem with File-Path. The reason I can't get that far is that one of Kwiki::Test's prerequisites, Spoon, itself fails to build because one of *its* prequisites, CGI, is no longer distributed with the Perl 5 core (as of 5.22.0). And since Spoon has not had a new release since Dec 09 2006, I suspect it may be abandon-ware. So, absent heroic efforts, I don't think the File-Path maintainers should worry about this ticket at the present time. Hence: Stalled. Thank you very much. Jim Keenan
Download (untitled) / with headers
text/plain 204b
Due to lack of response, and I am unable to install Spoon as well, we will have to reject this RT. When and if the upstream dependency issue is ever resolved, and the error reproduces, please re-open.


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.