[Module::Build] Re: [Module-build-checkins] Module-Build/lib/Module/Build Base.pm,1.567,1.568
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <ml...@th...> - 2006-03-28 11:19:21
|
The 'distclean' action was failing on Windows with the new batch script, Build.bat. The Build.bat script must terminate normally in order to execute the appended cleanup command during 'realclean' and 'distclean'. I'm not sure the fix below is the best one. One alternative, would be modify the 'Build' script (and thus the Build.bat script) to wrap the call to dispatch in an eval, converting any die into a warn so that the script can terminate normally. Another alternative is not to die at all during 'distcheck' Thoughts? Randy. Randy W. Sims wrote: > Update of /cvsroot/module-build/Module-Build/lib/Module/Build > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7957/lib/Module/Build > > Modified Files: > Base.pm > Log Message: > The 'distclean' operation on Windows was failing because it runs 'distcheck' which dies when it finds extra or missing files. This didn't give the 'Build.bat' script a chance to delete itself. Now it warns if the 'distcheck' actions is invoked as a dependency of another action; otherwise, it dies as before. > > Also, added 'Build.bat' to our MANIFEST.SKIP as well as the default generated MANIFEST.SKIP. > > Index: Base.pm > =================================================================== > RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v > retrieving revision 1.567 > retrieving revision 1.568 > diff -u -d -r1.567 -r1.568 > --- Base.pm 28 Mar 2006 04:28:23 -0000 1.567 > +++ Base.pm 28 Mar 2006 11:06:07 -0000 1.568 > @@ -2717,12 +2717,19 @@ > > sub ACTION_distcheck { > my ($self) = @_; > - > + > require ExtUtils::Manifest; > local $^W; # ExtUtils::Manifest is not warnings clean. > my ($missing, $extra) = ExtUtils::Manifest::fullcheck(); > - die "MANIFEST appears to be out of sync with the distribution\n" > - if @$missing || @$extra; > + > + return unless @$missing || @$extra; > + > + my $msg = "MANIFEST appears to be out of sync with the distribution\n"; > + if ( $self->invoked_action eq 'distcheck' ) { > + die $msg; > + } else { > + warn $msg; > + } > } > > sub _add_to_manifest { |