diff options
author | Steve Hay <SteveHay@planit.com> | 2007-05-03 07:51:17 +0000 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2007-05-03 07:51:17 +0000 |
commit | 808cb88e26f50aa982b59730bcba3cf312610440 (patch) | |
tree | cbd7d9bf702cbf39ce3f9304476fe221edaecd28 | |
parent | b89b0c6f71c5a46eb35a7e4a981d64eb1ed39c5d (diff) | |
download | perl-808cb88e26f50aa982b59730bcba3cf312610440.tar.gz |
Fix a CPANPLUS test that fails when run on a read-only source tree
(such as a p4 client repository)
p4raw-id: //depot/perl@31121
-rw-r--r-- | lib/CPANPLUS/Internals.pm | 2 | ||||
-rw-r--r-- | lib/CPANPLUS/Internals/Source.pm | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/CPANPLUS/Internals.pm b/lib/CPANPLUS/Internals.pm index 17760cb718..897a4a78fe 100644 --- a/lib/CPANPLUS/Internals.pm +++ b/lib/CPANPLUS/Internals.pm @@ -40,7 +40,7 @@ use vars qw[@ISA $VERSION]; CPANPLUS::Internals::Report ]; -$VERSION = "0.79_01"; +$VERSION = "0.79_02"; =pod diff --git a/lib/CPANPLUS/Internals/Source.pm b/lib/CPANPLUS/Internals/Source.pm index c58632b355..f527618b11 100644 --- a/lib/CPANPLUS/Internals/Source.pm +++ b/lib/CPANPLUS/Internals/Source.pm @@ -318,8 +318,11 @@ sub _update_source { ### `touch` the file, so windoze knows it's new -jmb ### works on *nix too, good fix -Kane - utime ( $now, $now, File::Spec->catfile($path, $file) ) or + ### make sure it is writable first, otherwise the `touch` will fail + unless (chmod ( 0644, File::Spec->catfile($path, $file) ) && + utime ( $now, $now, File::Spec->catfile($path, $file) )) { error( loc("Couldn't touch %1", $file) ); + } } return 1; |