Bug#781396: lintian: Update symbols file meta-fields check
Package: lintian
Version: 2.5.31
Severity: wishlist
Hi!
Here's a patch updating the symbols file meta-fields check, against
latest dpkg. It's not tested at all.
Thanks,
Guillem
From d1bcb5a1bd172ae023a45a1d24fcd537f3c67c13 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Sat, 28 Mar 2015 15:55:15 +0100
Subject: [PATCH] c/shared-libs: Update symbols file meta-fields
Signed-off-by: Guillem Jover <guillem@debian.org>
---
checks/shared-libs.desc | 4 ++--
checks/shared-libs.pm | 10 +++++++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/checks/shared-libs.desc b/checks/shared-libs.desc
index e647610..f3d9c89 100644
--- a/checks/shared-libs.desc
+++ b/checks/shared-libs.desc
@@ -392,8 +392,8 @@ Severity: important
Certainty: certain
Info: The symbols control file contains an unknown meta-information field.
.
- A list of currently supported fields may be found in deb-control(5).
-Ref: deb-control(5)
+ A list of currently supported fields may be found in deb-symbols(5).
+Ref: deb-symbols(5)
Tag: symbols-declared-but-not-shlib
Severity: important
diff --git a/checks/shared-libs.pm b/checks/shared-libs.pm
index b19eeb4..27dcdaf 100644
--- a/checks/shared-libs.pm
+++ b/checks/shared-libs.pm
@@ -49,6 +49,12 @@ my %stack_arches = map { $_ => 1 }qw(
sparc
);
+# List of symbols file meta-fields.
+my %symbols_meta_fields = map { $_ => 1 }qw(
+ Build-Depends-Package
+ Ignore-Blacklist-Groups
+);
+
my $ldconfig_dirs = Lintian::Data->new('shared-libs/ldconfig-dirs');
my $MA_DIRS = Lintian::Data->new('common/multiarch-dirs', qr/\s++/);
@@ -514,10 +520,8 @@ sub run {
} elsif (m/^\*\s(\S+):\s\S+/) {
# meta-information
- # This should probably be in a hash, but there's
- # only one supported value currently
tag 'unknown-meta-field-in-symbols-file', "$1, line $."
- unless $1 eq 'Build-Depends-Package';
+ unless exists $symbols_meta_fields{$1};
tag 'syntax-error-in-symbols-file', $.
unless defined $soname and $symbol_count == 0;
--
2.2.1.209.g41e5f3a
Reply to: