Subject: | fakeinstall modifies permissions of installed files |
sub install runs _chmod on the installed file targets even when in
$dry_run. As far as I can tell, it should not be touching any installed
files at all, during a fakeinstall.
Here's a patch that adds a $dry_run parameter to sub _chmod, and
provides that parameter when called from sub install:
--- lib/ExtUtils/Install.pm.orig Thu Sep 23 10:50:03 2010
+++ lib/ExtUtils/Install.pm Thu Sep 23 10:51:50 2010
@@ -154,10 +154,10 @@
}
-sub _chmod($$;$) {
- my ( $mode, $item, $verbose )=@_;
+sub _chmod($$;$$) {
+ my ( $mode, $item, $verbose, $dry_run )=@_;
$verbose ||= 0;
- if (chmod $mode, $item) {
+ if ($dry_run or chmod $mode, $item) {
printf "chmod(0%o, %s)\n",$mode, $item if $verbose > 1;
} else {
my $err="$!";
@@ -816,7 +816,7 @@
$mode = 0444 | ( $mode & 0111 ? 0111 : 0 );
$mode = $mode | 0222
if $realtarget ne $targetfile;
- _chmod( $mode, $targetfile, $verbose );
+ _chmod( $mode, $targetfile, $verbose, $dry_run );
$result->{install}{$targetfile} = $sourcefile;
1
} or do {
Thanks,
Alan Ferrency