[lintian] 01/01: White list well known debug package
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit eec50bbe3f52fe7b7fca68bcb2113546837ef394
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date: Sun Mar 26 17:18:15 2017 +0200
White list well known debug package
libc6-dbg and python\d+ need to be whitelisted
Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
checks/control-file.pm | 23 +++++++++++++++++++++--
data/common/dbg-pkg | 4 ++++
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/checks/control-file.pm b/checks/control-file.pm
index 264149b..ed89387 100644
--- a/checks/control-file.pm
+++ b/checks/control-file.pm
@@ -36,8 +36,15 @@ use Lintian::Util qw(file_is_encoded_in_non_utf8 read_dpkg_control
# rather than using ${shlibs:Depends}.
my @LIBCS = qw(libc6 libc6.1 libc0.1 libc0.3);
my $LIBCS = Lintian::Relation->new(join(' | ', @LIBCS));
+
my $src_fields = Lintian::Data->new('common/source-fields');
my $KNOWN_BUILD_PROFILES = Lintian::Data->new('fields/build-profiles');
+my $KNOWN_DBG_PACKAGE = Lintian::Data->new(
+ 'common/dbg-pkg',
+ qr/\s*\~\~\s*/,
+ sub {
+ return qr/$_[0]/xms;
+ });
sub run {
my ($pkg, undef, $info) = @_;
@@ -135,9 +142,8 @@ sub run {
tag 'debian-control-has-dbgsym-package', $bin;
}
if ($bin =~ /[-]dbg$/) {
- # libc dbg is needed by valgrind and gcc
tag 'debian-control-has-obsolete-dbg-package', $bin
- unless $pkg =~ /^e?glibc$/;
+ unless dbg_pkg_is_known($bin);
}
}
@@ -402,6 +408,19 @@ sub run {
return;
}
+# check debug package
+sub dbg_pkg_is_known {
+ my ($pkg) = @_;
+
+ foreach my $dbg_regexp ($KNOWN_DBG_PACKAGE->all) {
+ my $regex = $KNOWN_DBG_PACKAGE->value($dbg_regexp);
+ if($pkg =~ m/$regex/xms) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
# Check the dependencies of a -dev package. Any dependency on one of the
# packages in @packages that looks like the underlying library needs to
# have a version restriction that's at least as strict as the same upstream
diff --git a/data/common/dbg-pkg b/data/common/dbg-pkg
new file mode 100644
index 0000000..9c915f0
--- /dev/null
+++ b/data/common/dbg-pkg
@@ -0,0 +1,4 @@
+# gcc and valgring need glibc package
+^libc\d+-dbg$
+# python module build against python debug
+^python\d+-.*-dbg$
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: