[Reproducible-commits] [dpkg] 02/09: Dpkg::Source::Package::V2::do_build(): improve matching of ignored files

Holger Levsen holger at layer-acht.org
Tue May 3 08:43:02 UTC 2016


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

holger pushed a commit to annotated tag 1.14.28
in repository dpkg.

commit 28a559ee36da3edfb3b4e3a7896c08ea84508d45
Author: Raphaël Hertzog <hertzog at debian.org>
Date:   Thu Nov 5 21:49:08 2009 +0100

    Dpkg::Source::Package::V2::do_build(): improve matching of ignored files
    
    Modify logic to also match ignored files based on their relative path
    inside the source package (and not only on their filename).
---
 scripts/Dpkg/Source/Package/V2.pm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 677e04e..371adea 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -332,16 +332,17 @@ sub do_build {
         } @{$self->{'options'}{'tar_ignore'}}) . "}";
     my $filter_ignore = sub {
         # Filter out files that are not going to be included in the debian
-        # tarball due to ignores. Note that the filter logic does not
-        # correspond 100% to the logic of tar --exclude as it doesn't
-        # handle matching files on their full path inside the tarball
+        # tarball due to ignores.
         my %exclude;
+        my $reldir = File::Spec->abs2rel($File::Find::dir, $dir);
         foreach my $fn (glob($tar_ignore_glob)) {
             $exclude{$fn} = 1;
         }
         my @result;
         foreach my $fn (@_) {
-            push @result, $fn unless exists $exclude{$fn};
+            unless (exists $exclude{$fn} or exists $exclude{"$reldir/$fn"}) {
+                push @result, $fn;
+            }
         }
         return @result;
     };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list