[lintian] 01/01: c/fields.pm: Allow transitional -dbg pkgs to depend on -dbg pkgs
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 46a2771d79e71df60444cc72680b10eeeb5bf9ee
Author: Niels Thykier <niels@thykier.net>
Date: Sat Sep 21 21:43:15 2013 +0200
c/fields.pm: Allow transitional -dbg pkgs to depend on -dbg pkgs
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/fields.pm | 23 ++++++++++++++++-------
debian/changelog | 3 +++
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/checks/fields.pm b/checks/fields.pm
index 1fb5a37..a915820 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -223,7 +223,7 @@ our $VIRTUAL_PACKAGES = Lintian::Data->new('fields/virtual-packages');
our $SOURCE_FIELDS = Lintian::Data->new('common/source-fields');
sub run {
- my ($pkg, $type, $info, $proc) = @_;
+ my ($pkg, $type, $info, $proc, $group) = @_;
my ($version, $arch_indep);
#---- Format
@@ -1059,9 +1059,10 @@ sub run {
}
my (@arch_dep_pkgs, @dbg_pkgs);
- foreach my $binpkg (@binpkgs) {
+ foreach my $gproc ($group->get_binary_processables) {
+ my $binpkg = $gproc->pkg_name;
if ($binpkg =~ m/-dbg$/) {
- push @dbg_pkgs, $binpkg;
+ push(@dbg_pkgs, $gproc);
} elsif ($info->binary_field($binpkg, 'architecture', '') ne 'all')
{
push @arch_dep_pkgs, $binpkg;
@@ -1069,10 +1070,18 @@ sub run {
}
my $dstr = join('|', map { quotemeta($_) } @arch_dep_pkgs);
my $depregex = qr/^(?:$dstr)$/;
- foreach (@dbg_pkgs) {
- my $deps = $info->binary_relation($_, 'strong');
- tag 'dbg-package-missing-depends', $_
- unless $deps->matches($depregex, VISIT_PRED_NAME);
+ for my $dbg_proc (@dbg_pkgs) {
+ my $deps = $info->binary_relation($dbg_proc->pkg_name, 'strong');
+ my $missing = 1;
+ $missing = 0 if $deps->matches($depregex, VISIT_PRED_NAME);
+ if ($missing and $dbg_proc->info->is_pkg_class('transitional')) {
+ # If it is a transitional package, allow it to depend
+ # on another -dbg instead.
+ $missing = 0
+ if $deps->matches(qr/-dbg \Z/xsm, VISIT_PRED_NAME);
+ }
+ tag 'dbg-package-missing-depends', $dbg_proc->pkg_name
+ if $missing;
}
# Check for a python*-dev build dependency in source packages that
diff --git a/debian/changelog b/debian/changelog
index 0d567c1..b32e46e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,6 +25,9 @@ lintian (2.5.18) UNRELEASED; urgency=low
* checks/fields.{desc,pm}:
+ [NT] Warn about "?op=log" in svn.d.o brower links. Thanks
to Paul Wise for the report. (Closes: #707700)
+ + [NT] Fix false-positive dbg-package-missing-depends for
+ transitional dbg packages. Thanks to Paul Wise for the
+ report. (Closes: #677366)
* checks/files.{desc,pm}:
+ [BR] Fix false-positive dir-or-file-in-build-tree for
the sbuild source package. (Closes: #720910)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: