This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update makerel to provide a helpful error message if chmod fails on @writables
authorMatthew Horsfall <wolfsage@gmail.com>
Mon, 23 Jun 2014 12:31:47 +0000 (08:31 -0400)
committerMatthew Horsfall <wolfsage@gmail.com>
Mon, 23 Jun 2014 12:31:47 +0000 (08:31 -0400)
Porting/makerel

index 8739c29..f83abbb 100755 (executable)
@@ -161,8 +161,18 @@ my @writables = qw(
     win32/config_H.vc
     uconfig.h
 );
-system("chmod u+w @writables") == 0
-    or die "system: $!";
+
+my $out = `chmod u+w @writables 2>&1`;
+if ($? != 0) {
+    warn $out;
+    if ($out =~ /no such file/i) {
+        warn "Check that the files above still exist in the Perl core.\n";
+        warn "If not, remove them from \@writables in Porting/makerel\n";
+    }
+    exit 1;
+} else {
+    warn $out if $out;
+}
 
 chdir ".." or die $!;