On Wed, 2003-10-22 at 00:07, Rafael Garcia-Suarez wrote:
> Philippe M. Chiasson wrote:
> > + open $fh, '>', 'MANIFEST.SKIP' or die "open MANIFEST.SKIP: $!";
> > + my $cwd = Cwd::cwd();
> > + finddepth({ follow => 1, wanted => sub {
> > + return if -d;
> > + my $file = $File::Find::name;
> > + $file =~ s,^$cwd/?,,;
>
> For extra safety, this should be
> $file =~ s,^\Q$cwd\E/?,,;
>
> > + unless (exists $files{$file}) {
> > + print $fh "$file\n";
>
> And here :
> print $fh "^\Q$file\E\$\n";
> because MANIFEST.SKIP contains regular expressions.
I forgot about that, thanks, see updated patch.
> (That said, at a glance, I'm not convinced this patch
> is necessary.)
Well, have you tried to do :
make distcheck lately ?
And without a proper MANIFEST/MANIFEST.SKIP combo, making
signatures with Module::Signature is a problem.
$> cpansign -s
[...]
==> MISMATCHED content between MANIFEST and the distribution! <==
==> Please correct your MANIFEST file and/or delete extra files. <==
So, the main reason I am trying to generate those 2 files is so that
we can eventually generate signed distributions with M::S easily.
Index: ./lib/ModPerl/Manifest.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Manifest.pm,v
retrieving revision 1.7
diff -u -I$Id: -r1.7 Manifest.pm
--- ./lib/ModPerl/Manifest.pm 26 Sep 2003 17:37:33 -0000 1.7
+++ ./lib/ModPerl/Manifest.pm 22 Oct 2003 16:57:14 -0000
@@ -49,16 +49,31 @@
my $matches = maniskip();
open my $fh, '>', 'MANIFEST' or die "open MANIFEST: $!";
+ my %files;
+
for my $file (sort @files) {
if ($matches->($file)) {
warn "skipping $file\n";
next;
}
-
+ $files{$file}++;
print "$file\n";
print $fh "$file\n";
}
+ close $fh;
+
+ open $fh, '>', 'MANIFEST.SKIP' or die "open MANIFEST.SKIP: $!";
+ my $cwd = Cwd::cwd();
+ finddepth({ follow => 1, wanted => sub {
+ return if -d;
+ my $file = $File::Find::name;
+ $file =~ s,^\Q$cwd\E/?,,;
+ unless (exists $files{$file}) {
+ print $fh "^\Q$file\E\$\n";
+ }
+ }}, Cwd::cwd());
+
close $fh;
}
> > + }
> > + }}, Cwd::cwd());
> > +
> > close $fh;
> > }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
--------------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'
signature.asc
Description: This is a digitally signed message part
