Last Comment Bug 560318 - install-module.pl fails to install DateTime with modern versions of Module::Build and CPAN
: install-module.pl fails to install DateTime with modern versions of Module::B...
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Installation & Upgrading (show other bugs)
: 3.6
: All All
: -- major (vote)
: Bugzilla 3.6
Assigned To: Max Kanat-Alexander
: default-qa
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-19 13:04 PDT by Max Kanat-Alexander
Modified: 2010-05-16 07:10 PDT (History)
0 users
mkanat: approval+
mkanat: approval3.6+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
v1 (1.13 KB, patch)
2010-04-19 15:13 PDT, Max Kanat-Alexander
mkanat: review+
Details | Diff | Splinter Review
hackersinci (4.80 KB, image/jpg)
2010-05-16 07:08 PDT, hackersinci
no flags Details

Description Max Kanat-Alexander 2010-04-19 13:04:43 PDT
I recently had to install the latest Module::Build and CPAN while using install-module.pl on an old Perl (5.8.1), in order to get DateTime to install. But when trying to install DateTime, I got an error, like this:

ERROR: Can't create '/opt/perl-5.8.1/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi'

As you can see, it was trying to write to the global dir instead of the local one.

So apparently, we also need to set mbuild_install_arg, or possibly set mbuildpl_arg instead of mbuild_arg.
Comment 1 Max Kanat-Alexander 2010-04-19 15:13:45 PDT
Created attachment 440046 [details] [diff] [review]
v1

Wow, that took a REALLY long time to figure out! Okay, so the problem is that newer versions of Module::Build have a different behavior for install_base. So now I set arguments in such a way that they will work on all versions of Module::Build--in particular, I had to set install_path for the "lib" and "arch" dirs both, and then I also had to make sure that mbuild_install_arg was also set.

I could have just done mbuildpl_arg instead, but that would only have been run once by CPAN, even if we were doing multiple install-module.pl calls across various different Bugzilla installations on the same machine, so that could have been disastrous (it would have installed into the old Bugzilla directory when the user was trying to install into the new Bugzilla directory).
Comment 2 Max Kanat-Alexander 2010-04-19 16:27:39 PDT
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Install/CPAN.pm
Committed revision 7132.

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/3.6/
modified Bugzilla/Install/CPAN.pm
Committed revision 7086.
Comment 3 hackersinci 2010-05-16 07:08:12 PDT
Created attachment 445600 [details]
hackersinci

hackersinci

Note You need to log in before you can comment on or make changes to this bug.