Subject: | [PATCH] fix VMS test failures |
The attached patch fixes Manifest.t failures currently appearing in blead. It removes some
VMS-specific clobberng of the key/value pair in mkmanifest() just before writing a line out to
the file. This only affected the "yarrow" test example because that's the key that had a value.
I have no idea why that code was in there in the first place, but removing it seems to get
things working again.
I also (on VMS only) use underscores instead of dots in the filenames of backup files since
multiple dots are illegal in filenames on older systems and require awkward escaping on
newer systems.
Here it is in-line and also attached.
--- lib/ExtUtils/Manifest.pm;-0 Wed Mar 7 22:13:24 2007
+++ lib/ExtUtils/Manifest.pm Sun Mar 11 17:26:42 2007
@@ -13,7 +13,7 @@ use vars qw($VERSION @ISA @EXPORT_OK
$Is_MacOS $Is_VMS
$Debug $Verbose $Quiet $MANIFEST $DEFAULT_MSKIP);
-$VERSION = '1.51';
+$VERSION = '1.51_01';
@ISA=('Exporter');
@EXPORT_OK = qw(mkmanifest
manicheck filecheck fullcheck skipcheck
@@ -93,7 +93,9 @@ sub mkmanifest {
my $read = (-r 'MANIFEST' && maniread()) or $manimiss++;
$read = {} if $manimiss;
local *M;
- rename $MANIFEST, "$MANIFEST.bak" unless $manimiss;
+ my $bakbase = $MANIFEST;
+ $bakbase =~ s/\./_/g if $Is_VMS; # avoid double dots
+ rename $MANIFEST, "$bakbase.bak" unless $manimiss;
open M, ">$MANIFEST" or die "Could not open $MANIFEST: $!";
my $skip = _maniskip();
my $found = manifind();
@@ -112,7 +114,6 @@ sub mkmanifest {
warn "Added to $MANIFEST: $file\n" unless exists $read->{$file};
}
my $text = $all{$file};
- ($file,$text) = split(/\s+/,$text,2) if $Is_VMS && $text;
$file = _unmacify($file);
my $tabs = (5 - (length($file)+1)/8);
$tabs = 1 if $tabs < 1;
@@ -405,8 +406,10 @@ sub _check_mskip_directives {
}
close M;
return unless $flag;
- rename $mfile, "$mfile.bak";
- warn "Debug: Saving original $mfile as $mfile.bak\n" if $Debug;
+ my $bakbase = $mfile;
+ $bakbase =~ s/\./_/g if $Is_VMS; # avoid double dots
+ rename $mfile, "$bakbase.bak";
+ warn "Debug: Saving original $mfile as $bakbase.bak\n" if $Debug;
unless (open M, ">$mfile") {
warn "Problem opening $mfile: $!";
return;
--- lib/ExtUtils/t/Manifest.t;-0 Wed Mar 7 22:13:25 2007
+++ lib/ExtUtils/t/Manifest.t Sun Mar 11 17:23:32 2007
@@ -249,7 +249,8 @@ is( $files->{foobar}, '', '
'mymanifest.skip excluded via mydefault.skip' );
ok( ! exists $files->{'mydefault.skip'},
'mydefault.skip excluded via mydefault.skip' );
- $Files{"$_.bak"}++ for (qw(MANIFEST MANIFEST.SKIP));
+ my $extsep = $Is_VMS ? '_' : '.';
+ $Files{"$_.bak"}++ for ('MANIFEST', "MANIFEST${extsep}SKIP");
}
add_file('MANIFEST' => 'Makefile.PL');
Subject: | manifest.patch |
--- lib/ExtUtils/Manifest.pm;-0 Wed Mar 7 22:13:24 2007
+++ lib/ExtUtils/Manifest.pm Sun Mar 11 17:26:42 2007
@@ -13,7 +13,7 @@ use vars qw($VERSION @ISA @EXPORT_OK
$Is_MacOS $Is_VMS
$Debug $Verbose $Quiet $MANIFEST $DEFAULT_MSKIP);
-$VERSION = '1.51';
+$VERSION = '1.51_01';
@ISA=('Exporter');
@EXPORT_OK = qw(mkmanifest
manicheck filecheck fullcheck skipcheck
@@ -93,7 +93,9 @@ sub mkmanifest {
my $read = (-r 'MANIFEST' && maniread()) or $manimiss++;
$read = {} if $manimiss;
local *M;
- rename $MANIFEST, "$MANIFEST.bak" unless $manimiss;
+ my $bakbase = $MANIFEST;
+ $bakbase =~ s/\./_/g if $Is_VMS; # avoid double dots
+ rename $MANIFEST, "$bakbase.bak" unless $manimiss;
open M, ">$MANIFEST" or die "Could not open $MANIFEST: $!";
my $skip = _maniskip();
my $found = manifind();
@@ -112,7 +114,6 @@ sub mkmanifest {
warn "Added to $MANIFEST: $file\n" unless exists $read->{$file};
}
my $text = $all{$file};
- ($file,$text) = split(/\s+/,$text,2) if $Is_VMS && $text;
$file = _unmacify($file);
my $tabs = (5 - (length($file)+1)/8);
$tabs = 1 if $tabs < 1;
@@ -405,8 +406,10 @@ sub _check_mskip_directives {
}
close M;
return unless $flag;
- rename $mfile, "$mfile.bak";
- warn "Debug: Saving original $mfile as $mfile.bak\n" if $Debug;
+ my $bakbase = $mfile;
+ $bakbase =~ s/\./_/g if $Is_VMS; # avoid double dots
+ rename $mfile, "$bakbase.bak";
+ warn "Debug: Saving original $mfile as $bakbase.bak\n" if $Debug;
unless (open M, ">$mfile") {
warn "Problem opening $mfile: $!";
return;
--- lib/ExtUtils/t/Manifest.t;-0 Wed Mar 7 22:13:25 2007
+++ lib/ExtUtils/t/Manifest.t Sun Mar 11 17:23:32 2007
@@ -249,7 +249,8 @@ is( $files->{foobar}, '', '
'mymanifest.skip excluded via mydefault.skip' );
ok( ! exists $files->{'mydefault.skip'},
'mydefault.skip excluded via mydefault.skip' );
- $Files{"$_.bak"}++ for (qw(MANIFEST MANIFEST.SKIP));
+ my $extsep = $Is_VMS ? '_' : '.';
+ $Files{"$_.bak"}++ for ('MANIFEST', "MANIFEST${extsep}SKIP");
}
add_file('MANIFEST' => 'Makefile.PL');