[Reproducible-commits] [dpkg] 01/09: dpkg-source: don't complain on binary files that are ignored
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 99f2ba0a4f611d93e30f6eb023f12ed71f09ba1e
Author: Raphael Hertzog <hertzog at debian.org>
Date: Sun Apr 19 20:08:44 2009 +0200
dpkg-source: don't complain on binary files that are ignored
To avoid mistakes with "3.0 (quilt)" source packages, dpkg-source fails if
it finds binary files that have not been whitelisted in the debian
directory. Unfortunately it also fails on binary files that are ignored
and that will not be included in the debian tarball. This commit fixes
that although not completely.
The exclude patterns passed to tar --exclude are used to match filenames
and also full path names inside the tarball. This commit only adds support
for simple filename match. It is enough for all realistic cases.
---
debian/changelog | 9 +++++++++
scripts/Dpkg/Source/Package/V2.pm | 24 +++++++++++++++++++++++-
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 5b2d048..abfe698 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+dpkg (1.14.28) UNRELEASED; urgency=low
+
+ * Another round of updates concerning new source formats:
+ - fix dpkg-source to not complain on binary files that are ignored and are
+ not going to be included in the debian tarball of a "3.0 (quilt)" source
+ package. Closes: #524375
+
+ -- Raphael Hertzog <hertzog at debian.org> Sun, 03 Jan 2010 18:21:35 +0100
+
dpkg (1.14.27) stable; urgency=low
* Cherry-pick some fixes from squeeze concerning new source formats:
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index a162f53..677e04e 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -324,7 +324,29 @@ sub do_build {
}
}
};
- find({ wanted => $check_binary, no_chdir => 1 }, File::Spec->catdir($dir, "debian"));
+ my $tar_ignore_glob = "{" . join(",",
+ map {
+ my $copy = $_;
+ $copy =~ s/,/\\,/g;
+ $copy;
+ } @{$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
+ my %exclude;
+ foreach my $fn (glob($tar_ignore_glob)) {
+ $exclude{$fn} = 1;
+ }
+ my @result;
+ foreach my $fn (@_) {
+ push @result, $fn unless exists $exclude{$fn};
+ }
+ return @result;
+ };
+ find({ wanted => $check_binary, preprocess => $filter_ignore,
+ no_chdir => 1 }, File::Spec->catdir($dir, "debian"));
error(_g("detected %d unwanted binary file(s) " .
"(add them in debian/source/include-binaries to allow their " .
"inclusion)."), $unwanted_binaries) if $unwanted_binaries;
--
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