[devscripts] 04/04: mk-origtargz: Split exclusions on whitespace

James McCoy jamessan at debian.org
Sun May 4 01:43:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit f12891bf12c75a58d548f3934336bc74873c6c96
Author: James McCoy <jamessan at debian.org>
Date:   Sat May 3 21:32:01 2014 -0400

    mk-origtargz: Split exclusions on whitespace
    
    The Files-Excluded stanza should follow the same format as the Files
    stanzas.  This means that the patterns are whitespace separated and no
    special escapes (other than for the \, *, and ? characters) are needed.
    
    This reverts commit 69329b529522b2e84ea2c2e20d7e6e4d72e13c75 and
    bug #733111.
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 scripts/mk-origtargz.pl | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/scripts/mk-origtargz.pl b/scripts/mk-origtargz.pl
index f994671..c582a66 100755
--- a/scripts/mk-origtargz.pl
+++ b/scripts/mk-origtargz.pl
@@ -272,19 +272,16 @@ for my $copyright_file (@copyright_files) {
     if (not -e $copyright_file) {
 	die "File $copyright_file not found.";
     } elsif (   $data
-	&& defined $data->{'format'}
+	&& defined $data->{format}
 	&& $data->{'files-excluded'})
     {
-	if ($data->{'format'} =~ m{^$okformat/?$}) {
-	    my @rawexcluded = ($data->{"files-excluded"} =~ /(?:\A|\G\s+)((?:\\.|[^\\\s])+)/g);
-	    # un-escape
-	    push @exclude_globs, map { s/\\(.)/$1/g; s?/+$??; $_ } @rawexcluded;
+	if ($data->{format} =~ m{^$okformat/?$}) {
+	    push(@exclude_globs, grep { $_ } split(/\s+/, $data->{'files-excluded'}));
 	} else {
-	    print STDERR
-		  "WARNING: The file $copyright_file mentions Files-Excluded, but its ".
-		  "format is not recognized. Specify Format: ".
-		  "http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ ".
-		  "in order to remove files from the tarball with mk-origtargz.\n";
+	    warn "WARNING: The file $copyright_file mentions Files-Excluded, but its ".
+		 "format is not recognized. Specify Format: ".
+		 "http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ ".
+		 "in order to remove files from the tarball with mk-origtargz.\n";
 	}
     }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list