Subject: | pminst doesn't find Tie::Hash if /usr/share/perl/5.18 is a symlink |
Date: | Fri, 27 Sep 2013 23:53:20 +0200 |
To: | Bugs in pmtools via RT <bug-pmtools [...] rt.cpan.org> |
From: | Axel Beckert <abe [...] debian.org> |
Hi,
there's one more issue which makes the test suite of 1.51 fail when
being run on Debian Unstable with Perl 5.18.1:
Test Summary Report
-------------------
t/modpods.t (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 1
t/pods.t (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 1
t/stdpods.t (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 1
I could trace back to the following inconsistent behaviour of pmpath
and pminst -l:
$ bin/pmpath Tie::Hash
/usr/share/perl/5.18/Tie/Hash.pm
$ bin/pminst -l Tie::Hash
$ bin/pminst -l | fgrep Tie/Hash
$ perl -le 'foreach (@INC) { print $_ }'
/etc/perl
/usr/local/lib/perl/5.18.1
/usr/local/share/perl/5.18.1
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.18
/usr/share/perl/5.18
/usr/local/lib/site_perl
.
$
With some printf-debugging in pminst I could figure out what's the
cause:
/usr/share/perl/5.18 is a symlink to /usr/share/perl/5.18.1. But
File::Find doesn't follow symlinks by default and hence it doesn't
descent into /usr/share/perl/5.18.1.
The following patch fixed the issue for me:
Index: pmtools/bin/pminst
===================================================================
--- pmtools.orig/bin/pminst 2013-09-27 23:37:28.000000000 +0200
+++ pmtools/bin/pminst 2013-09-27 23:38:36.000000000 +0200
@@ -35,7 +35,7 @@
for $startdir (@INC) {
next if (!-d $startdir);
- find(\&wanted, $startdir);
+ find({ wanted => \&wanted, follow => 1 }, $startdir);
}
sub wanted {
Regards, Axel
--
,''`. | Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
`- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5