Bug 622896 - Perl looks in directories more than once
Summary: Perl looks in directories more than once
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 13
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-10 17:53 UTC by Nigel Horne
Modified: 2010-09-23 05:00 UTC (History)
9 users (show)

Fixed In Version: perl-5.10.1-119.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-23 05:00:18 UTC


Attachments (Terms of Use)

Description Nigel Horne 2010-08-10 17:53:55 UTC
Description of problem:
Perl looks for a module in directories more than once. For example it will look in /usr/local/share/perl5, for a file, then if not found it will look again.


Version-Release number of selected component (if applicable):
perl-5.10.1-116.fc13.i686

How reproducible:
100%

Steps to Reproduce:
1. perl -V
2.
3.
  
Actual results:
@INC includes duplicates


Expected results:
The @INC directories should be unique

Additional info:
It would be nice to include /usr/local/lib/site_perl in the list.

Comment 1 Marcela Mašláňová 2010-08-11 06:03:46 UTC
I'm testing a new patch for this issue.

Comment 2 Marcela Mašláňová 2010-08-12 19:07:41 UTC
Next update will contain these paths:

  @INC:
    /usr/local/lib/perl5
    /usr/local/share/perl5
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl5
    /usr/share/perl5
    /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
    /usr/local/lib/perl5/site_perl/5.10.0
    /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.10.0
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/site_perl
    .

I removed duplicates which can be removed. For example /usr/share/perl5 is here twice, because first time it is privlib and second time vendorlib. It can't be removed in this release because some modules could have troubles finding modules in path.

Is it /usr/local/lib/site_perl still needed? It wasn't also in previous updates.

Comment 3 Petr Pisar 2010-08-13 06:54:41 UTC
`repoquery --whatprovides '/usr/local/lib/site_perl/*'' does not return anything concluding Fedora does not need it.

Comment 4 Ralf Corsepius 2010-08-13 07:19:26 UTC
(In reply to comment #3)
> `repoquery --whatprovides '/usr/local/lib/site_perl/*'' does not return
> anything concluding Fedora does not need it.    

This doesn't mean anything.

/usr/local is supposed to contain files an admin of a system has locally installed on his system to override vendor files below /usr.

Packaging-wise, this means /usr/local is "out of Fedora's packaging business" (Fedora must not package files into subdirectories below /usr/local), but it doesn't mean applications should not take directories below /usr/local into account.

A classic example for such behavior is gcc. By default, it looks for headers into /usr/local/include before it looks into /usr/include.

Comment 5 Petr Pisar 2010-08-13 07:43:20 UTC
I meant no official Fedora package does need it. Thus it's just matter of backward compatibility since we provide /usr/local/lib/perl5. I'd like to not remove any path in one Fedora release because of the compatibility.

Comment 6 Nigel Horne 2010-08-13 08:39:58 UTC
I am not talking about removing a directory from the search list.  That is a different issue.  I am talking about not looking in a directory more than once.

Comment 7 Marcela Mašláňová 2010-08-13 08:51:23 UTC
(In reply to comment #6)
> I am not talking about removing a directory from the search list.  That is a
> different issue.  I am talking about not looking in a directory more than once.    

I can only repeat my answer from comment #2. It's not possible to cut it more than to this. The same path is there twice because it represent different macros for perl.

Comment 8 Nigel Horne 2010-08-13 09:44:37 UTC
(In reply to comment #3)
> `repoquery --whatprovides '/usr/local/lib/site_perl/*'' does not return
> anything concluding Fedora does not need it.    

That misses the point.  It's the best place for users to put locally created modules.

Comment 9 Petr Pisar 2010-08-13 09:49:38 UTC
(In reply to comment #8)
> (In reply to comment #3)
> > `repoquery --whatprovides '/usr/local/lib/site_perl/*'' does not return
> > anything concluding Fedora does not need it.    
> 
> That misses the point.  It's the best place for users to put locally created
> modules.    

For local modules we have /usr/local/lib/perl5. All other /usr/local/... paths are superflous.

Comment 10 Fedora Update System 2010-09-07 12:37:37 UTC
perl-5.10.1-119.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/perl-5.10.1-119.fc13

Comment 11 Fedora Update System 2010-09-08 02:18:52 UTC
perl-5.10.1-119.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update perl'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/perl-5.10.1-119.fc13

Comment 12 Fedora Update System 2010-09-23 05:00:07 UTC
perl-5.10.1-119.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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