The following commit has been merged in the master branch:
commit 1731ce5cc233cd01896298d7e4395bf0042959bf
Author: Raphaël Hertzog <[email protected]>
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).
diff --git a/scripts/Dpkg/Source/Package/V2.pm
b/scripts/Dpkg/Source/Package/V2.pm
index b7fe76d..9accdf6 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -336,16 +336,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;
};
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]