diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 2003-11-04 12:07:25 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-11-12 09:46:51 +0000 |
commit | 6c9f5ae604f56643950b95aad06003efaa426a02 (patch) | |
tree | f34fa69342e8c9b1750a9aff37889b080ebd87c5 /installperl | |
parent | 055634da33476425970b2578bb1e356b9fb9e43d (diff) | |
download | perl-6c9f5ae604f56643950b95aad06003efaa426a02.tar.gz |
make install not installing fully
Message-ID: <20031105040725.GA2629@math.berkeley.edu>
p4raw-id: //depot/perl@21708
Diffstat (limited to 'installperl')
-rwxr-xr-x | installperl | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/installperl b/installperl index 58c81f54fc..cdc8fc8654 100755 --- a/installperl +++ b/installperl @@ -727,14 +727,16 @@ sub link { $packlist->{$xto} = { from => $xfrom, type => 'link' }; }; if ($@) { - warn $@; + warn "Replacing link() with File::Copy::copy(): $@"; print $verbose ? " cp $from $xto\n" : " $xto\n" unless $silent; print " creating new version of $xto\n" if $Is_VMS and -e $to and !$silent; - File::Copy::copy($from, $to) - ? $success++ - : warn "Couldn't copy $from to $to: $!\n" - unless $nonono; + unless ($nonono or File::Copy::copy($from, $to) and ++$success) { + # Might have been that F::C::c can't overwrite the target + warn "Couldn't copy $from to $to: $!\n" + unless -f $to and (chmod(0666, $to), unlink $to) + and File::Copy::copy($from, $to) and ++$success; + } $packlist->{$xto} = { type => 'file' }; } $success; @@ -757,9 +759,12 @@ sub copy { $xto =~ s/^\Q$destdir\E// if $destdir; print $verbose ? " cp $from $xto\n" : " $xto\n" unless $silent; print " creating new version of $xto\n" if $Is_VMS and -e $to and !$silent; - File::Copy::copy($from, $to) - || warn "Couldn't copy $from to $to: $!\n" - unless $nonono; + unless ($nonono or File::Copy::copy($from, $to)) { + # Might have been that F::C::c can't overwrite the target + warn "Couldn't copy $from to $to: $!\n" + unless -f $to and (chmod(0666, $to), unlink $to) + and File::Copy::copy($from, $to); + } $packlist->{$xto} = { type => 'file' }; } |