Bug 1122368 - Missing perl-Time-HiRes requirement
Summary: Missing perl-Time-HiRes requirement
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl
Version: 7.0
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Petr Pisar
QA Contact: Martin Kyral
URL:
Whiteboard:
: 1154741 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-23 05:43 UTC by Steven Moix
Modified: 2015-03-05 07:55 UTC (History)
6 users (show)

Fixed In Version: perl-5.16.3-284.el7
Doc Type: Bug Fix
Doc Text:
Cause: Running cpan(1) tool for the first time while perl-Time-HiRes and perl-local-lib packages are not installed. Consequence: The tool crashes because Time::HiRes or local::lib Perl module is not available. Fix: Run-time dependency on perl(Time::HiRes) has been added into perl package, run-time dependency on perl(local::lib) has been added into perl-CPAN package. Result: When cpan(1) tool is installed it will pull in all needed dependencies.
Clone Of:
: 1122498 (view as bug list)
Environment:
Last Closed: 2015-03-05 07:55:22 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0338 normal SHIPPED_LIVE perl bug fix update 2015-03-05 12:22:38 UTC
CentOS 7417 None None None Never

Description Steven Moix 2014-07-23 05:43:32 UTC
perl-Time-HiRes seems to be a missing requirement when configuring cpan for the first time.

See https://bugs.centos.org/view.php?id=7417 for the details and reproduction steps.

Comment 2 Petr Pisar 2014-07-23 09:08:54 UTC
This is a bug in `perl' package. The package should run-require `perl(Time::HiRes)' because Net::Ping module's hires() subroutine loads Time::HiRes:

$hires = 0;
sub hires
{
  my $self = shift;
  $hires = 1 unless defined
    ($hires = ((defined $self) && (ref $self)) ? shift() : $self);
  require Time::HiRes if $hires;
}

Comment 3 Petr Pisar 2014-07-23 09:38:27 UTC
There is another issue after proceeding next:

Can't locate local/lib.pm in @INC (@INC contains: /root/perl5/lib/perl5/x86_64-linux-thread-multi /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 /root) at /usr/share/perl5/CPAN/FirstTime.pm line 1300.

The CPAN::FirstTime module offers local::lib by default if site directories do not exist:

sub _local_lib_config {
    # Set environment stuff for this process
    require local::lib;
    [...]
}

perl-CPAN sub-package should run-require `perl(local::lib)' too.

Comment 4 Petr Pisar 2014-07-23 09:47:12 UTC
How to test:

(1) # yum remove perl
(2) # yum install /usr/bin/cpan
(3) # rm -rf ~/.cpan
(4) # cpan </dev/null
Before:
  The reported message is printed and the `cpan' command dies with a non-zero
  exit code.
After:
  The `cpan' command succeeds.

Comment 8 George B. Magklaras 2014-09-01 10:32:27 UTC
Yes, the failing requirement is true. Until this is fixed, a simple yum -y install perl-Time-HiRes should be enough to remedy the issue. I cron-ed it on newly installed RHEL and CentOS 7 boxes and no further problems were raised.

Comment 9 Petr Pisar 2014-10-21 05:29:14 UTC
*** Bug 1154741 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2015-03-05 07:55:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0338.html


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