Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Maintainer(s)' notes

I prefer that bugs & patches are filed on GitHub rather than on RT: https://github.com/kenahoo/Path-Class/issues. Thanks.

Report information
The Basics
Id: 47241
Status: resolved
Priority: 0/
Queue: Path-Class

People
Owner: Nobody in particular
Requestors: toddr [...] cpanel.net
Cc:
AdminCc:

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



Subject: 01-basic.t failing tests on OSX
I'm installing as root in OSX. I think this is a wierd directory representation issue: 090622.100741 root@CMU-339622.WV.CC.CMU.EDU (/var/root/.cpan/build/Path-Class-0.17-JcSKWG) $>prove -lvm t/01-basic.t t/01-basic.t .. 1..66 # Running under perl version 5.010000 for Unix # Current time local: Mon Jun 22 10:07:56 2009 # Current time GMT: Mon Jun 22 14:07:56 2009 # Using Test.pm version 1.25 ok 1 ... ok 39 ok 40 not ok 41 # Test 41 got: "/private/var/root/.cpan/build/Path-Class-0.17-JcSKWG" (t/01-basic.t at line 82) # Expected: "/var/root/.cpan/build/Path-Class-0.17-JcSKWG" # t/01-basic.t line 82 is: ok dir()->absolute, dir(Cwd::cwd())->cleanup; ok 42 ... ok 66 Failed 1/66 subtests Test Summary Report ------------------- t/01-basic.t (Wstat: 0 Tests: 66 Failed: 1) Failed test: 41 Files=1, Tests=66, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.04 cusr 0.00 csys = 0.08 CPU) Result: FAIL
$>perl -V Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=darwin, osvers=9.6.0, archname=darwin-2level uname='darwin todd-rinaldos-imac.local 9.6.0 darwin kernel version 9.6.0: mon nov 24 17:37:00 pst 2008; root:xnu-1228.9.59~1release_i386 i386 ' config_args='' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include', optimize='-O3', cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include' ccversion='', gccversion='4.0.1 (Apple Inc. build 5490)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/local/lib -L/opt/local/lib' libpth=/usr/local/lib /opt/local/lib /usr/lib libs=-ldbm -ldl -lm -lutil -lc perllibs=-ldl -lm -lutil -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO Built under darwin Compiled at Jan 25 2009 12:03:50 %ENV: PERL5LIB="" PERL5OPT="" PERL5_CPANPLUS_IS_RUNNING="37135" PERL5_CPAN_IS_RUNNING="37135" PERLDB_OPTS="RemotePort=:9000" @INC: /usr/local/perl510/lib/5.10.0/darwin-2level /usr/local/perl510/lib/5.10.0 /usr/local/perl510/site/lib/darwin-2level /usr/local/perl510/site/lib .
On Mon Jun 22 07:11:34 2009, todd_rinaldo wrote: Show quoted text
> $>perl -V > Summary of my perl5 (revision 5 version 10 subversion 0) configuration: > Platform: > osname=darwin, osvers=9.6.0, archname=darwin-2level > uname='darwin todd-rinaldos-imac.local 9.6.0 darwin kernel version > 9.6.0: mon nov 24 17:37:00 pst 2008; root:xnu-1228.9.59~1release_i386 i386 ' > config_args='' > hint=recommended, useposix=true, d_sigaction=define > useithreads=undef, usemultiplicity=undef > useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef > use64bitint=undef, use64bitall=undef, uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp > -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include', > optimize='-O3', > cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp > -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include' > ccversion='', gccversion='4.0.1 (Apple Inc. build 5490)', > gccosandvers='' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' > -L/usr/local/lib -L/opt/local/lib' > libpth=/usr/local/lib /opt/local/lib /usr/lib > libs=-ldbm -ldl -lm -lutil -lc > perllibs=-ldl -lm -lutil -lc > libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a > gnulibc_version='' > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' > cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup > -L/usr/local/lib -L/opt/local/lib' > > > Characteristics of this binary (from libperl): > Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP > USE_LARGE_FILES USE_PERLIO > Built under darwin > Compiled at Jan 25 2009 12:03:50 > %ENV: > PERL5LIB="" > PERL5OPT="" > PERL5_CPANPLUS_IS_RUNNING="37135" > PERL5_CPAN_IS_RUNNING="37135" > PERLDB_OPTS="RemotePort=:9000" > @INC: > /usr/local/perl510/lib/5.10.0/darwin-2level > /usr/local/perl510/lib/5.10.0 > /usr/local/perl510/site/lib/darwin-2level > /usr/local/perl510/site/lib > .
The problem is that several system directories are actually symlinked to directories in /private. /root, /tmp, and /var are all actually /private/root, /private/tmp and /private/var on Mac OS X. If you .cpan directory is in any of those directories, the install of Path-Class fails on OS X.
Show quoted text
> > The problem is that several system directories are actually symlinked > to directories in > /private. /root, /tmp, and /var are all actually /private/root, > /private/tmp and /private/var > on Mac OS X. If you .cpan directory is in any of those directories, > the install of Path-Class > fails on OS X. >
Looking at the test, it would fail anytime Cwd::cwd is not absolute. The following patch should skip this test in those cases. --- t/01-basic.t.old 2009-06-14 22:35:12.000000000 -0500 +++ t/01-basic.t 2009-07-13 20:31:45.000000000 -0500 @@ -79,7 +79,10 @@ ok dir(''), '/'; ok dir(), '.'; ok dir('', 'var', 'tmp'), '/var/tmp'; - ok dir()->absolute, dir(Cwd::cwd())->cleanup; + skip( + ! dir(Cwd::cwd())->is_absolute ? 0 : "Cwd::cwd not absolute", + dir()->absolute, dir(Cwd::cwd())->cleanup + ); ok dir(undef), undef; }
On Mon Jul 13 21:34:52 2009, SMPETERS wrote: Show quoted text
> Looking at the test, it would fail anytime Cwd::cwd is not absolute. > The following patch should skip this test in those cases.
I don't think that's the way to go - Cwd::cwd() should always return an absolute path of course. Is the problem just that one path is cleaned up, and the other is not?
I've fixed this for the next release, using the resolve() method.  Thanks.