Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the ExtUtils-Manifest CPAN distribution.

Report information
The Basics
Id: 25377
Status: resolved
Priority: 0/
Queue: ExtUtils-Manifest

People
Owner: Nobody in particular
Requestors: cberry [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.51
Fixed in: (no value)



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');
From: SMPETERS [...] cpan.org
On Sun Mar 11 19:40:11 2007, CBERRY wrote: Show quoted text
> 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');
Hi Randy, The patch above seemed to be missed for the 1.52 and 1.53 releases. Are there some concerns with this patch. This code has been live in the Perl core, including Perl 5.10, for quite some time <http://public.activestate.com/cgi-bin/perlbrowse/p/30544>. Any way we can get this into a release? Thanks, Steve Peters
Thanks for pointing this out, Steve, and sorry for missing it. I've incorporated this into the ExtUtils-Manifest svn sources: http://svn.perl.org/modules/ExtUtils-Manifest/trunk/ and will be releasing this as ExtUtils-Manifest-1.54 to CPAN shortly.