Bug 1138817
| Summary: | Perl core modules are installed into vendor_perl, so they are not updated by cpan | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dan Book <grinnz> |
| Component: | perl | Assignee: | Jitka Plesnikova <jplesnik> |
| Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 20 | CC: | cweyl, iarnell, jplesnik, kasal, perl-devel, ppisar, psabata, rc040203, tcallawa |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-09-08 14:15:50 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Dan Book
2014-09-05 17:04:26 UTC
(In reply to Dan Book from comment #0) > Description of problem: > As perl core modules are broken into separate packages, these packages > install the modules into vendor_perl. By default the vendor_perl directory > precedes the core module directory in @INC. True. > CPAN by default will install > updates to core modules in the core directory, not site_perl. No. It installs all modules into the same place. I think it used to install core modules into core directory a lot of years ago, but this not true anymore. > Steps to Reproduce: > 1. Install perl and perl-core from yum > 2. Run "cpan Test::Simple" or "cpanm Test::Simple" > > Actual results: > New version of Test-Simple distribution is installed It's installed either into site directory or local::lib directory. It depends what you choose at cpan configuration. If it's configured for site directory, then the modules will be installed there. Otherwise the modules will be installed into ~/perl5 and your ~/.bashrc will be modified to set PERL_MM_OPT and PERL_MB_OPT variables, if you select so. > but old version from RPM continues to be used, In addition, if you install perl-homedir package, PERL5LIB and PERL_LOCAL_LIB_ROOT will be set on login, so any perl invocation will use the ~/perl5 tree automatically. I think this is what brought your confusion. The cpan installs into ~/perl5 but does use it by default. > Can be avoided by using local::lib or modifying @INC. Maybe there is a > better solution. I think the best solution is to modify the cpan client to offer creating the site directories. If it succeeds, it will default installation to site directories instead of the local::lib. See bug #1132321. Or does you cpan client behave differently? When testing this it was not using local::lib or any such local install. There was no ~/perl5. CPAN and cpanm both install the updated Test::Simple into /usr/share/perl5 by default. Non-core modules are installed into the site perl directory which is /usr/local/share/perl5: $ perl -V:installsitelib installsitelib='/usr/local/share/perl5'; But there is no trace of the Test::Simple distribution there after having both cpan and cpanm "successfully" install the updated distribution. /usr/share/perl5/Test/Simple.pm however is the updated version. The problem is that while /usr/local/share/perl5 comes before /usr/share/perl5/vendor_perl (where the RPM installs to), /usr/share/perl5 comes after in @INC. I can't seem to reproduce it again with the latest version of CPAN or Test::Simple. It is installing to /usr/local/share/perl5 now. Maybe was a bug in an earlier version. Will see if it happens again. Confirming that this was a bug in the Test::Simple distribution. It was fixed to install into the site directory in perl > 5.12. |