Re: [Module-build-general] [PATCH] always copy files to dist dir
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-08-19 14:09:09
|
On Tuesday, August 19, 2003, at 08:49 AM, Dave Rolsky wrote:
>
> I think we just need to chmod the file in the distmeta action.
Might be better to just remove it if it exists - not sure how chmod()
will act on different platforms. I've just committed the following
patch.
-Ken
Index: lib/Module/Build/Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -r1.173 -r1.174
--- lib/Module/Build/Base.pm 18 Aug 2003 16:02:24 -0000 1.173
+++ lib/Module/Build/Base.pm 19 Aug 2003 14:07:07 -0000 1.174
@@ -1507,7 +1507,7 @@
my $dist_dir = $self->dist_dir;
$self->delete_filetree($dist_dir);
$self->add_to_cleanup($dist_dir);
- ExtUtils::Manifest::manicopy($dist_files, $dist_dir, 'best');
+ ExtUtils::Manifest::manicopy($dist_files, $dist_dir, 'cp');
warn "*** Did you forget to add $self->{metafile} to the
MANIFEST?\n" unless exists $dist_files->{$self->{metafile}};
$self->_sign_dir($dist_dir) if $self->{properties}{sign};
@@ -1595,6 +1595,9 @@
};
$node->{generated_by} = "Module::Build version " .
Module::Build->VERSION;
+
+ # If we're in the distdir, the metafile may exist and be
non-writable.
+ $self->delete_filetree($self->{metafile});
# YAML API changed after version 0.30
my $yaml_sub = $YAML::VERSION le '0.30' ? \&YAML::StoreFile :
\&YAML::DumpFile;
|