The following commit has been merged in the master branch: commit 689e22c7047320faefcc640289adcdd8a6060775 Author: Raphael Geissert <[EMAIL PROTECTED]> Date: Fri Nov 28 17:09:19 2008 +0100
checks/debhelper: Add new tag for dependencies of additional debhelper commands This complements package-uses-debhelper-but-lacks-build-depends for commands that are not part of the debhelper package. diff --git a/checks/debhelper b/checks/debhelper index 4e0917b..59e8745 100644 --- a/checks/debhelper +++ b/checks/debhelper @@ -35,6 +35,7 @@ use Lintian::Data; my $cdbscompat = 5; my $maint_commands = Lintian::Data->new ('debhelper/maint_commands'); +my $dh_commands_depends = Lintian::Data->new ('debhelper/dh_commands', '='); # The version at which debhelper commands were introduced. Packages that use # one of these commands must have a dependency on that version of debhelper or @@ -61,6 +62,7 @@ my $compat = ''; my $usescdbs = ''; my $seendhpython = ''; my $usescdbspython = ''; +my %missingbdeps; open(RULES, '<', "debfiles/rules") or fail("cannot read debian/rules: $!"); my $dhcompatvalue; @@ -82,6 +84,10 @@ while (<RULES>) { if ($maint_commands->known($dhcommand) and not m/\s+\-n\s+/) { $needtomodifyscripts = 1; } + if ($dh_commands_depends->known($dhcommand)) { + my $dep = $dh_commands_depends->value($dhcommand); + $missingbdeps{$dep} = $dhcommand; + } if ($versions{$dhcommand}) { push (@versioncheck, $dhcommand); } @@ -174,6 +180,11 @@ while (defined(my $file=readdir(DEBIAN))) { if ($needbuilddepends && ! Dep::implies($bdepends, Dep::parse('debhelper'))) { tag "package-uses-debhelper-but-lacks-build-depends", ""; } + while (my ($dep, $command) = each %missingbdeps) { + next if $dep eq 'debhelper'; #handled above + tag 'missing-build-dependency-for-dh_-command', "$command=$dep" + unless (Dep::implies($bdepends, Dep::parse($dep))); + } } elsif ($file =~ m/^ex\.|\.ex$/i) { tag "dh-make-template-in-source", "debian/$file"; } diff --git a/checks/debhelper.desc b/checks/debhelper.desc index 603eae4..811f544 100644 --- a/checks/debhelper.desc +++ b/checks/debhelper.desc @@ -105,6 +105,14 @@ Info: This package uses dh_python but apparently does not tell it to use may mean that the package has not been converted to the current Python policy, in which case it probably should be. +Tag: missing-build-dependency-for-dh_-command +Type: error +Severity: important +Certainty: possible +Info: The source package appears to be using a dh_ command but doesn't build + depend on the package that actually provides it. If it uses it, it must + build depend on it. + Tag: debhelper-script-needs-versioned-build-depends Severity: normal Certainty: certain diff --git a/debian/changelog b/debian/changelog index 37db9c8..1c1056f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ lintian (2.1.0) unstable; urgency=low * Summary of tag changes: + Added + - missing-build-dependency-for-dh_-command - quilt-patch-missing-description - shlib-calls-exit @@ -17,6 +18,9 @@ lintian (2.1.0) unstable; urgency=low * checks/debhelper: + [FL] Use Lintian::Data for list of debhelper commands that modify maintainer scripts. Patch by Raphael Geissert. + + [FL] Add new tag missing-build-dependency-for-dh_-command for + debhelper commands that are not from the debhelper package. + Patch by Raphael Geissert. * checks/fields: + [ADB] Ignore non-dependency fields when considering whether a versioned dependency is satisfied by the perl core packages. diff --git a/testset/dh-test/debian/rules b/testset/dh-test/debian/rules index dbe5113..613cf7c 100755 --- a/testset/dh-test/debian/rules +++ b/testset/dh-test/debian/rules @@ -81,7 +81,9 @@ binary-arch: build install # dh_installinit # dh_installcron # dh_installinfo + dh_installxfonts dh_installman + -dh_gnustep # dh_dhelp dh_suidregister dh_link @@ -89,6 +91,7 @@ binary-arch: build install dh_compress dh_fixperms # dh_perl + -dh_lisp # dh_python # dh_makeshlibs dh_installdeb diff --git a/testset/tags.dh-test b/testset/tags.dh-test index 9c6e4a4..4e6249c 100644 --- a/testset/tags.dh-test +++ b/testset/tags.dh-test @@ -1,3 +1,5 @@ +E: dh-test source: missing-build-dependency-for-dh_-command dh_gnustep=gnustep-make +E: dh-test source: missing-build-dependency-for-dh_-command dh_lisp=dh-lisp E: dh-test: description-is-dh_make-template E: dh-test: helper-templates-in-copyright E: dh-test: section-is-dh_make-template -- Debian package checker -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]