This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add-package.pl fixup
authorJos I. Boumans <jos@dwim.org>
Wed, 25 Feb 2009 08:31:02 +0000 (09:31 +0100)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 25 Feb 2009 08:31:02 +0000 (09:31 +0100)
Sometimes, using find, add-package.pl will construct filenames with 2
consecutive slashes, ie:

 Package-Name/bin//script.pl

As this literal string isn't in the MANIFEST yet, it'll be added
erroneously. The below patch fixes this.

Porting/add-package.pl

index ded907d..54a4f03 100644 (file)
@@ -137,7 +137,7 @@ my @TestFiles;
        ? system( "cp -fR $CPV t $TopDir" ) && die "Copy of t/ failed: $?"
        : warn "No t/ directory found\n";
 
-    @TestFiles =    map { chomp; s|^$TopDirRe||; $_ }
+    @TestFiles =    map { chomp; s|^$TopDirRe||; s|//|/|g; $_ }
                     ### should we get rid of this file?
                     grep { $ExcludeRe && $_ =~ $ExcludeRe
                         ? do {  warn "Removing $_\n";
@@ -169,7 +169,7 @@ BIN: {
 
     system($CopyCmd) && die "Copy of $BinDir failed: $?";
 
-    @BinFiles = map { chomp; s|^$TopDirRe||; $_ }
+    @BinFiles = map { chomp; s|^$TopDirRe||; s|//|/|g; $_ }
                 ### should we get rid of this file?
                 grep { $ExcludeRe && $_ =~ $ExcludeRe
                     ? do {  warn "Removing $_\n";