Last Comment Bug 560330 - Old versions of CPAN don't install DateTime properly
: Old versions of CPAN don't install DateTime properly
Product: Bugzilla
Classification: Server Software
Component: Installation & Upgrading (show other bugs)
: 3.6
: All All
-- normal (vote)
: Bugzilla 3.6
Assigned To: Max Kanat-Alexander
: default-qa
: 557769 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2010-04-19 13:32 PDT by Max Kanat-Alexander
Modified: 2012-05-22 06:29 PDT (History)
5 users (show)
mkanat: approval+
mkanat: approval3.6+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

v1 (6.25 KB, patch)
2010-04-20 14:56 PDT, Max Kanat-Alexander
mkanat: review+
Details | Diff | Splinter Review

Description User image Max Kanat-Alexander 2010-04-19 13:32:50 PDT
DateTime requires Params::Validate. Installing Params::Validate via CPAN dies if Module::Build isn't installed. So, should make sure that Module::Build is installed whenever it does an installation (that will protect us against any future similar situations).
Comment 1 User image Max Kanat-Alexander 2010-04-19 15:31:25 PDT
This is actually worse than I thought. It turns out that the version of CPAN that ships with Perl 5.8.8 doesn't install DateTime and Params::Validate properly at all--it ignores the Build.PL file, because it doesn't support Module::Build. So the XS components of both those modules never get installed, and so things will be much slower than they otherwise would.
Comment 2 User image Frédéric Buclin 2010-04-19 15:34:13 PDT
What are our alternatives?
Comment 3 User image Max Kanat-Alexander 2010-04-19 15:34:18 PDT
We need at least CPAN 1.81 for things to work right. Once we have that, we can also install the YAML module, and then CPAN will use the YAML module to read the prerequisites of DateTime, and install Module::Build properly, fixing all these bugs in one swoop.
Comment 4 User image Max Kanat-Alexander 2010-04-19 15:35:52 PDT
So probably what I'm going to do here is check the version of CPAN installed. Then, if it's too old, I'll have do nothing but upgrade CPAN and install YAML, and then quit with a red message saying to run the command again.
Comment 5 User image Max Kanat-Alexander 2010-04-19 16:08:35 PDT
Okay, I've filed the following bug against DateTime:
Comment 6 User image Max Kanat-Alexander 2010-04-19 16:20:35 PDT
And this bug against Params::Validate:
Comment 7 User image Max Kanat-Alexander 2010-04-20 13:29:19 PDT
  Okay, I think that this bug may actually affect several modules, and who knows what modules it will affect in the future.

  Here's what I'm going to do:

  If the required modules are missing or too old, I'm going to install them, and then re-run the original command using exec().
Comment 8 User image Max Kanat-Alexander 2010-04-20 14:56:57 PDT
Created attachment 440347 [details] [diff] [review]

Okay, this updates the CPAN module if it's too old, and the YAML module if it's not there. It also updates the CPAN setting defaults for newer versions of CPAN. Also, I removed from the urllist because it seems to frequently have problems and hang when we try to download stuff from it.

The colorize_ stuff is only going onto HEAD, but the rest of the patch is going to 3.6 also.
Comment 9 User image Max Kanat-Alexander 2010-04-20 15:04:16 PDT
For 3.6, I removed the colorize_ lines on checkin.

Committing to: bzr+ssh://
modified Bugzilla/Install/
modified Bugzilla/Install/
Committed revision 7133.

Committing to: bzr+ssh://
modified Bugzilla/Install/
modified Bugzilla/Install/
Committed revision 7087.
Comment 10 User image Max Kanat-Alexander 2010-04-20 15:05:12 PDT
*** Bug 557769 has been marked as a duplicate of this bug. ***
Comment 11 User image Yuri 2010-06-04 13:33:36 PDT
bugzilla-3.6: confirmed the message "Cannot determine local time zone" while opening the new bug

Which release this will be fixed in?
Comment 12 User image Max Kanat-Alexander 2010-06-05 13:54:45 PDT
  This will be fixed in 3.6.1.
Comment 13 User image Tom Dickson 2010-07-07 15:18:22 PDT
This worked correctly for me in 3.6.1
Comment 14 User image Max Kanat-Alexander 2010-07-07 19:52:34 PDT
Cool, good to know. :-)
Comment 15 User image Yuri 2010-08-11 00:39:57 PDT
I am still getting this error in bugzilla-3.6.1 on FreeBSD-8.1. I know it is supposed to be fixed, but ...

--- message ---
Software error:

Cannot determine local time zone
Comment 16 User image Max Kanat-Alexander 2010-08-11 01:20:32 PDT
@Yuri At this point, your problem is a support issue. Ask the support-bugzilla mailing list about it. The mailing list is described here:
Comment 17 User image Yuri 2010-08-11 01:48:13 PDT

This PR is supposed to be fixed and I don;t find it fixed. This is exactly the same issue this PR is about.
Comment 18 User image Govardhan Reddy 2012-05-22 06:29:13 PDT
I am facing same problem while installing perlmodule DateTime.. Installing on CentOS 5.5,Bugzilla Version 3.6.1..

[root@dev1 bugzilla]# /usr/bin/perl DateTime
 Error is " Failed 43/95 test scripts, 54.74% okay. 1/1 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 255
  /usr/bin/make test -- NOT OK
Running make install
Appending installation info to /var/www/html/bugzilla/lib/i386-linux-thread-multi/perllocal.pod
  /usr/bin/make install  -- OK

and i have tried 

"[root@dev1 bugzilla]# yum install DateTime
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * updates:
Setting up Install Process
No package DateTime available.
Nothing to do "

 while checking "yum list perl" it showing DateTime is installed

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