Re: [Module::Build] [PATCH] Failure to find local 'lib' dir during M::B install with tests that chdi
Status: Beta
Brought to you by:
kwilliams
From: Ken W. <ke...@ma...> - 2006-05-12 17:13:41
|
Hi Chris, Your patch shouldn't work - curdir() doesn't return an absolute path, just a string like ".". I suspect your change seemed to fix your problem because you tested manually, i.e. not using CPANPLUS? -Ken On May 12, 2006, at 9:06 AM, Chris Dolan wrote: > [Sorry to post this to the list. RT seems to be down right now...] > > I just tried installing 0.28 via CPANPLUS on a Mac 10.4 box where I > had 0.27_06 installed before and got the following errors: > > t/ppm............. * ERROR: Configuration was initially created > with Module::Build version '0.2706', > but we are now using version '0.28'. Please re-run the Build.PL > or Makefile.PL script. > t/ppm.............dubious > Test returned status 2 (wstat 512, 0x200) > > t/xs.............. * ERROR: Configuration was initially created > with Module::Build version '0.2706', > but we are now using version '0.28'. Please re-run the Build.PL > or Makefile.PL script. > t/xs..............dubious > Test returned status 255 (wstat 65280, 0xff00) > > The issue seems to be that Build.PL shifts 'lib' and 't/lib' onto > the @INC stack as relative paths. Then when some of the regression > tests chdir, they fail to find the 0.28 .pm files and instead find > the old ones. The following patch works for me by forcing the @INC > additions to be absolute instead of relative. > > Chris > > > --- /Users/chris/Work/Module-Build/Build.PL 2006-01-20 > 08:29:14.000000000 -0600 > +++ Build.PL 2006-05-12 08:58:15.000000000 -0500 > @@ -3,19 +3,15 @@ > # On some platforms (*ahem*, MacPerl 5.6.1) "use lib qw(lib);" > doesn't > # find the local "lib" directory, so we use File::Spec to do it > properly. > use File::Spec 0.82; > -use lib File::Spec->catdir('lib'); # use our self to install > -use lib File::Spec->catdir('t', 'lib'); # use bundled Test::More > +use lib File::Spec->catdir(File::Spec->curdir, 'lib'); # use > our self to install > +use lib File::Spec->catdir(File::Spec->curdir, 't', 'lib'); # use > bundled Test::More > > # We use Module::Build to test & install itself. > use Module::Build; > > > -- > Chris Dolan, Software Developer, Clotho Advanced Media Inc. > 608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703 > vCard: http://www.chrisdolan.net/ChrisDolan.vcf > > Clotho Advanced Media, Inc. - Creators of MediaLandscape Software > (http://www.media-landscape.com/) and partners in the revolutionary > Croquet project (http://www.opencroquet.org/) > > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Module-build-general mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/module-build-general |