[Module::Build] [PATCH] Failure to find local 'lib' dir during M::B install with tests that chdir
Status: Beta
Brought to you by:
kwilliams
|
From: Chris D. <ch...@cl...> - 2006-05-12 14:06:19
|
[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/)
|