Bug#255593: lintian: should check build-depends(-indep) for virtual packages without a real package too
Package: lintian
Version: 1.23.0
Severity: normal
Tags: patch
As of 1.23.0, lintian correctly catches errors of the form:
Depends: mail-transport-agent
(This is an error since mail-transport-agent is a virtual package, it
should be "exim | mail-transport-agent".) The included patch extends
this to also checking Build-Depends: and Build-Depends-Indep:.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.5-1-k7
Locale: LANG=C, LC_CTYPE=en_US.ISO8859-1
Versions of packages lintian depends on:
ii binutils 2.14.90.0.7-8 The GNU assembler, linker and bina
ii diffstat 1.34-1 produces graph of changes introduc
ii file 4.09-1 Determines file type using "magic"
ii man-db 2.4.2-16 The on-line manual pager
ii perl 5.8.4-2 Larry Wall's Practical Extraction
-- no debconf information
diff -ur lintian-1.23.0/checks/fields lintian-1.23.0.check-virtual-builddep/checks/fields
--- lintian-1.23.0/checks/fields 2004-06-21 23:24:49.000000000 +0200
+++ lintian-1.23.0.check-virtual-builddep/checks/fields 2004-06-21 23:26:19.000000000 +0200
@@ -422,6 +422,8 @@
unfold($field, \$data);
$data =~ s/^\s*(.+?)\s*$/$1/;
+ my $is_dep_field = sub { grep { $_ eq $_[0] } qw(build-depends build-depends-indep) };
+
for my $dep (split /\s*,\s*/, $data) {
my @alternatives;
push @alternatives, [_split_dep($_), $_] for (split /\s*\|\s*/, $dep);
@@ -443,6 +445,8 @@
print "E: $pkg $type: bad-relation $field: $part_d_orig\n"
if $rest;
}
+ print "W: $pkg $type: virtual-package-depends-without-real-package-depends $field: $alternatives[0]->[0]\n"
+ if ($known_virtual_packages{$alternatives[0]->[0]} && &$is_dep_field($field));
}
}
}
Reply to: