diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-08 17:04:24 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-08 17:04:24 +0000 |
commit | 5f239f738af2139a8fc4f623d7bc64b919ff8840 (patch) | |
tree | 17d5def80b3dc7a4c1c013dd614169eb0b5d0bc8 /installperl | |
parent | 377238032065164d317e5c90591b42257d3d70b2 (diff) | |
download | perl-5f239f738af2139a8fc4f623d7bc64b919ff8840.tar.gz |
Workaround for broken symlink traversal.
p4raw-id: //depot/perl@17102
Diffstat (limited to 'installperl')
-rwxr-xr-x | installperl | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/installperl b/installperl index dcc92a5ecb..5c423241db 100755 --- a/installperl +++ b/installperl @@ -814,13 +814,27 @@ sub installlib { sub copy_if_diff { my($from,$to)=@_; return 1 if (($^O eq 'VMS') && (-d $from)); - -f $from || warn "$0: $from not found"; + my $perlpodbadsymlink; + if ($from =~ m!^pod/perl[\w-]+\.pod$! && + -l $from && + ! -e $from) { + # Some Linux implementations have problems traversing over + # multiple symlinks (when going over NFS?) and fail to read + # the symlink target. Combine this with the fact that some + # of the pod files (the perl$OS.pod) are symlinks (to ../README.$OS), + # and you end up with those pods not getting installed. + $perlpodbadsymlink = 1; + } + -f $from || $perlpodbadsymlink || warn "$0: $from not found"; $packlist->{$to} = { type => 'file' }; if (compare($from, $to) || $nonono) { safe_unlink($to); # In case we don't have write permissions. if ($nonono) { $from = $depth . "/" . $from if $depth; } + if ($perlpodbadsymlink && $from =~ m!^pod/perl(.+)\.pod$!) { + $from = "README.$1"; + } copy($from, $to); # Restore timestamps if it's a .a library or for OS/2. if (!$nonono && ($Is_OS2 || $to =~ /\.a$/)) { |