diff options
author | Alan Burlison <Alan.Burlison@uk.sun.com> | 1998-03-08 12:50:23 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-03-16 13:17:14 +0000 |
commit | 354f3b563e416c45738a8a6587f56819e7000baa (patch) | |
tree | 89664d74f3f35925e745adccd7b93a69f35aeb71 /installman | |
parent | e9cb6d146cf75820a5771a80b499a65f1217c427 (diff) | |
download | perl-354f3b563e416c45738a8a6587f56819e7000baa.tar.gz |
PATCH for 5.004_62 : Add .packlist handling classes to ExtUtils
plus manual update of MANIFEST
p4raw-id: //depot/perl@814
Diffstat (limited to 'installman')
-rwxr-xr-x | installman | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/installman b/installman index 4d74bcfea2..e6377204b1 100755 --- a/installman +++ b/installman @@ -3,8 +3,11 @@ BEGIN { @INC = ('lib') } use Config; use Getopt::Long; use File::Find; +use File::Copy; use File::Path qw(mkpath); +use ExtUtils::Packlist; use subs qw(unlink chmod rename link); +use vars qw($packlist); require Cwd; umask 022; @@ -50,6 +53,8 @@ $notify = $opt_notify || $opt_n; -x "t/perl$Config{exe_ext}" || warn "WARNING: You've never run 'make test'!!!", " (Installing anyway.)\n"; +$packlist = ExtUtils::Packlist->new("$Config{installarchlib}/.packlist"); + # Install the main pod pages. runpod2man('pod', $man1dir, $man1ext); @@ -156,6 +161,7 @@ sub lsmodpods { } } +$packlist->write() unless $notify; print STDERR " Installation complete\n"; exit 0; @@ -194,12 +200,27 @@ print STDERR " unlink $name\n"; } sub link { - local($from,$to) = @_; + my($from,$to) = @_; + my($success) = 0; print STDERR " ln $from $to\n"; - eval { CORE::link($from,$to) } -|| system('cp', $from, $to) == 0 -|| warn "Couldn't link $from to $to: $!\n" unless $notify; + eval { + CORE::link($from, $to) + ? $success++ + : ($from =~ m#^/afs/# || $to =~ m#^/afs/#) + ? die "AFS" # okay inside eval {} + : warn "Couldn't link $from to $to: $!\n" + unless $notify; + $packlist->{$to} = { type => 'file' }; + }; + if ($@) { + File::Copy::copy($from, $to) + ? $success++ + : warn "Couldn't copy $from to $to: $!\n" + unless $notify; + $packlist->{$to} = { type => 'file' }; + } + $success; } sub rename { @@ -214,6 +235,7 @@ warn("Cannot rename to `$to.$i': $!"), return 0 } link($from,$to) || return 0; unlink($from); + $packlist->{$to} = { type => 'file' }; } sub chmod { |