This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Clean up MANIFEST before creating a new one.
authorCraig A. Berry <craigberry@mac.com>
Fri, 12 Aug 2011 14:09:30 +0000 (09:09 -0500)
committerCraig A. Berry <craigberry@mac.com>
Fri, 12 Aug 2011 14:49:15 +0000 (09:49 -0500)
This is a follow-up to e4ac890e26c, which changed behavior from
appending to an existing MANIFEST to creating a new one.  On VMS,
that would give us multiple versions, which probably wouldn't
matter except that the tests insist that there is one and only
one copy of every file they've created and they only clean up the
highest version.

The easiest way to handle this is to make sure we clean up first
before creating a new MANIFEST file.

dist/ExtUtils-Manifest/lib/ExtUtils/Manifest.pm

index 62e9877..40df070 100644 (file)
@@ -730,6 +730,7 @@ sub _fix_manifest {
     }
 
     if ( $must_rewrite ) {
+        1 while unlink $MANIFEST; # avoid multiple versions on VMS
         open MANIFEST, ">", $MANIFEST or die "(must_rewrite=$must_rewrite) Could not open >$MANIFEST: $!";
         for (my $i=0; $i<=$#manifest; $i+=2) {
             print MANIFEST "$manifest[$i]\n";