don't write along symlinks into a read only source tree (was Re: [ID 20010129.006...
Nicholas Clark [Wed, 28 Feb 2001 23:28:49 +0000 (23:28 +0000)]
Message-ID: <20010228232849.A55187@plum.flirble.org>

Allow a completely write protected source code tree
when using the Configure -Dmksymlinks.

p4raw-id: //depot/perl@8971

embed.pl
warnings.pl

index a3bedba..fcee010 100755 (executable)
--- a/embed.pl
+++ b/embed.pl
@@ -29,6 +29,7 @@ sub walk_table (&@) {
        $F = $filename;
     }
     else {
+       unlink $filename;
        open F, ">$filename" or die "Can't open $filename: $!";
        $F = \*F;
     }
index 3a5037d..138b1db 100644 (file)
@@ -172,8 +172,8 @@ if (@ARGV && $ARGV[0] eq "tree")
     exit ;
 }
 
-#unlink "warnings.h";
-#unlink "lib/warnings.pm";
+unlink "warnings.h";
+unlink "lib/warnings.pm";
 open(WARN, ">warnings.h") || die "Can't create warnings.h: $!\n";
 open(PM, ">lib/warnings.pm") || die "Can't create lib/warnings.pm: $!\n";