Bug 594768 - perl-CPAN should install modules into local/site_perl directory
Summary: perl-CPAN should install modules into local/site_perl directory
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: perl   
(Show other bugs)
Version: 6.0
Hardware: All Linux
low
medium
Target Milestone: rc
: ---
Assignee: Marcela Mašláňová
QA Contact: Petr Šplíchal
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-21 14:40 UTC by Petr Šplíchal
Modified: 2018-12-01 15:49 UTC (History)
3 users (show)

Fixed In Version: perl-5.10.1-110.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 616736 (view as bug list)
Environment:
Last Closed: 2010-11-11 14:53:58 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1201191 None None None Never

Description Petr Šplíchal 2010-05-21 14:40:01 UTC
Description of problem:

Using CPAN to install the latest modules can result into
overwriting files from the perl rpm package. This can cause
problems such as broken modules after package update (bug 375621).

Version-Release number of selected component (if applicable):
perl-CPAN-1.9402-109.el6.x86_64

Steps to Reproduce:
# perl -MCPAN -e 'install "Scalar::Util"'
...
Installing /usr/lib64/perl5/auto/List/Util/Util.so
Installing /usr/lib64/perl5/Scalar/Util.pm
Installing /usr/lib64/perl5/Scalar/Util/PP.pm
Installing /usr/lib64/perl5/List/Util.pm
Installing /usr/lib64/perl5/List/Util/XS.pm
Installing /usr/lib64/perl5/List/Util/PP.pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
  GBARR/Scalar-List-Utils-1.23.tar.gz
  /usr/bin/make install  -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state

Actual results:
# rpm -V perl
.M5....T.    /usr/lib64/perl5/List/Util.pm
SM5....T.    /usr/lib64/perl5/List/Util/PP.pm
.M5....T.    /usr/lib64/perl5/List/Util/XS.pm
.M5....T.    /usr/lib64/perl5/Scalar/Util.pm
SM5....T.    /usr/lib64/perl5/Scalar/Util/PP.pm
SM5....T.    /usr/lib64/perl5/auto/List/Util/Util.so

Expected results:
Manually installed modules go into local/site_perl directory where
they override system files by being earlier in @INC. Inspecting
@INC I see:

# perl -e 'print join "\n", @INC;'
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/local/share/perl5
/usr/lib64/perl5
/usr/share/perl5
/usr/share/perl5
/usr/lib64/perl5
/usr/share/perl5
/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.10.0
/usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/site_perl

which looks like site_perl directories are only after system,
while in RHEL5 we have site_perl at the beginning:

# perl -e 'print join "\n", @INC;'
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/5.8.8

Is that expected? I guess not...

Comment 2 RHEL Product and Program Management 2010-06-07 16:02:49 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Marcela Mašláňová 2010-06-08 08:07:15 UTC
Paths @INC were changed to be shorter (and probably faster) for RHEL-6. They are defined in this way:
site:    /usr/local/lib64/perl5
site:    /usr/local/share/perl5
    /usr/local/share/perl5
vendor:    /usr/lib64/perl5
vendor:    /usr/share/perl5
    /usr/share/perl5
perl:    /usr/lib64/perl5
perl:    /usr/share/perl5
compatibility directories:    /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
    /usr/local/lib/perl5/site_perl/5.10.0
    /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.10.0
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/site_perl

I'll add a patch that set "site" as default installation path for CPAN.

Comment 5 Petr Šplíchal 2010-07-21 09:48:07 UTC
Verified with perl-5.10.1-113.el6.x86_64,
perl-CPAN-1.9402-113.el6.x86_64. All files now installed into
/usr/local/* which will prevent clashes:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Scalar::Util version is 1.21
:: [   PASS   ] :: Installing Scalar::Util module from CPAN
:: [   LOG    ] :: Scalar::Util version is 1.23
:: [   PASS   ] :: Scalar::Util smoke test
:: [   PASS   ] :: Checking for installed files
:: [   PASS   ] :: Checking /usr/local/lib64/perl5/auto/List/Util/Util.so
:: [   PASS   ] :: Checking /usr/local/lib64/perl5/auto/List/Util/Util.bs
:: [   PASS   ] :: Checking /usr/local/lib64/perl5/List/Util.pm
:: [   PASS   ] :: Checking /usr/local/lib64/perl5/List/Util/XS.pm
:: [   PASS   ] :: Checking /usr/local/lib64/perl5/List/Util/PP.pm
:: [   PASS   ] :: Checking /usr/local/lib64/perl5/Scalar/Util.pm
:: [   PASS   ] :: Checking /usr/local/lib64/perl5/Scalar/Util/PP.pm
:: [   PASS   ] :: Checking /usr/local/share/man/man3/Scalar::Util.3pm
:: [   PASS   ] :: Checking /usr/local/share/man/man3/List::Util.3pm
:: [   PASS   ] :: Checking /usr/local/share/man/man3/List::Util::XS.3pm
:: [   PASS   ] :: Verifying the perl package
:: [   LOG    ] :: Duration: 1m 19s
:: [   LOG    ] :: Assertions: 14 good, 0 bad
:: [   PASS   ] :: RESULT: Test

Comment 6 releng-rhel@redhat.com 2010-11-11 14:53:58 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Comment 7 Ken Stailey 2013-04-03 21:26:33 UTC
FYI this will never be fixed in RHEL 5
https://access.redhat.com/knowledge/solutions/264193


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