Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 13169
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.01
  • 0.02
  • 0.03
  • 0.03_1
  • 0.04
  • 0.04_01
  • 0.05
  • 0.05_01
  • 0.06
  • 0.07
  • 0.08
  • 0.09
  • 0.10
  • 0.11
  • 0.12
  • 0.13
  • 0.14
  • 0.15
  • 0.16
  • 0.17
  • 0.18
  • 0.18_01
  • 0.18_02
  • 0.18_03
  • 0.18_04
  • 0.19
  • 0.19_02
  • 0.19_03
  • 0.19_04
  • 0.19_05
  • 0.20
  • 0.20_01
  • 0.20_02
  • 0.21
  • 0.21_01
  • 0.21_02
  • 0.22
  • 0.23
  • 0.24
  • 0.24_01
  • 0.25
  • 0.25_01
  • 0.25_02
  • 0.25_03
  • 0.26
  • 0.2601
  • 0.2602
  • 0.2603
  • 0.2604
  • 0.2605
  • 0.2606
  • 0.2607
  • 0.2608
  • 0.2609
  • 0.2610
  • 0.27_01
Fixed in: (no value)



Subject: M::B can't be upgraded using it's own API
Currently it is impossible to upgrade Module::Build using it's own API. Assume you have Module::Build installed and you'd like to upgrade it, with a script like this: [kane@coke ~...build/Module-Build-0.2610]$ cat x.pl use lib '/Users/kane/.cpanplus/5.8.3/build/Module-Build-0.2608/lib'; use Module::Build; print "Version: $Module::Build::VERSION\n"; $mb = Module::Build->new_from_context; If you execute this script, you'll get the following errors: [kane@coke ~...build/Module-Build-0.2610]$ perlc x.pl Version: 0.2608 /opt/bin/perl -I/Users/kane/.cpanplus/5.8.3/build/Module-Build-0.2608/lib Build.PL Checking whether your kit is complete... Looks good * Optional prerequisite ExtUtils::ParseXS isn't installed * Optional prerequisite ExtUtils::CBuilder isn't installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation. Feature 'YAML_support' enabled. Deleting Build Removed previous script 'Build' Creating new 'Build' script for 'Module-Build' version '0.2610' * ERROR: Configuration was initially created with Module::Build version '0.261', but we are now using version '0.2608'. Please re-run the Build.PL or Makefile.PL script. This is due to the fact that the Build file insists on adding the following lines, which force the loading of the NOT YET INSTALLED module::build when it shells out to run it's own build procedure: unless ($is_same_dir) { die ('This script must be run from /Users/kane/.cpanplus/5.8.3/build/Module-Build-0.2610, not '.$curdir."\n". "Please re-run the Build.PL script here.\n"); } unshift @INC, ( '/Users/kane/.cpanplus/5.8.3/build/Module-Build-0.2610/lib', '/Users/kane/.cpanplus/5.8.3/build/Module-Build-0.2608/lib' ); } And since it's in the 'new_from_context' method, it's impossible to interfere from the calling code to prevent this from happening. In praxis this mean no CPANPLUS user can upgrade Module::Bulid.
From: shlomif [...] iglu.org.il
[KANE - Thu Jun 9 09:41:44 2005]: Show quoted text
> Currently it is impossible to upgrade Module::Build using it's own > API. > > Assume you have Module::Build installed and you'd like to upgrade
it, Show quoted text
> with a > script like this: > > [kane@coke ~...build/Module-Build-0.2610]$ cat x.pl > use lib '/Users/kane/.cpanplus/5.8.3/build/Module-Build- > 0.2608/lib'; > > use Module::Build; > > print "Version: $Module::Build::VERSION\n"; > > $mb = Module::Build->new_from_context; > > If you execute this script, you'll get the following errors:
Actually, this script would run fine. What wouldn't is the following script: <<< use Module::Build; print "Version: $Module::Build::VERSION\n"; $mb = Module::Build->new_from_context; Show quoted text
>>>
This is what CPANPLUS.pm does. Regards, Shlomi Fish
I believe Jos's original message was correct - note the two different versions referenced. The same thing would happen in your situation if you had a different version of M::B installed than you're currently installing. -Ken
I've addressed this in CVS today. The idea is that we use the already-installed M::B for both the "perl Build.PL" stage and the subsequent build stages. Previously it would find the to-be- installed M::B for "perl Build.PL", and then use the already-installed M::B thereafter. I say "addressed" rather than "fixed" because I'm still not completely happy with the solution. There are two problems with it: 1) the bug needs to be fixed in the version already *installed* in the user's system, which means they'll still need to do one more manual install before things will start working from then on, and 2) it will make M::B install itself using an older M:: B, but some of the tests may count on using the to-be-installed version. 2) shouldn't be as bad as it used to be, actually - we've been cleaning some of that stuff up. It might be nice to be able to use the new to-be-installed version of M::B for all the installation stages rather than the already-installed one, but that has problems too: 1) I can't figure out how to do it, and 2) even if I could, it might be a nasty trick to play on the caller (e.g. CPANPLUS) who thinks they're using the API of the older M::B. -Ken