[SCM] Debian package checker branch, master, updated. 2.5.4-75-gc1ceb87
The following commit has been merged in the master branch:
commit 8cb6e81bdc440ed63d90a72c846b1c5d331a75ed
Author: Gergely Nagy <algernon@balabit.hu>
Date: Fri Dec 23 11:40:50 2011 +0100
checks/debhelper: Check that when using dh-exec an appropriate b-d is present.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
diff --git a/checks/debhelper b/checks/debhelper
index a0c85c6..0130620 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -62,6 +62,7 @@ my $droot = $info->debfiles;
my $seencommand = '';
my $needbuilddepends = '';
+my $needdhexecbuilddepends = '';
my $needtomodifyscripts = '';
my $level;
my $seenversiondepends = '0';
@@ -352,8 +353,10 @@ foreach my $file (sort readdir(DEBIAN)) {
# Do not make assumptions about the contents of an
# executable debhelper file, unless it's a dh-exec
# script.
- _check_dh_exec ($cmd, "debian/$file", "$droot/$file")
- if ( $cmd =~ /dh-exec/);
+ if ( $cmd =~ /dh-exec/) {
+ $needdhexecbuilddepends = 1;
+ _check_dh_exec ($cmd, "debian/$file", "$droot/$file");
+ }
next;
}
}
@@ -385,6 +388,10 @@ $bdepends = $info->relation('build-depends-all');
if ($needbuilddepends && ! $bdepends->implies('debhelper')) {
tag 'package-uses-debhelper-but-lacks-build-depends';
}
+if ($needdhexecbuilddepends && ! $bdepends->implies('dh-exec')) {
+ tag 'package-uses-dh-exec-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"
diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index f4783a7..4e8922f 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -335,3 +335,9 @@ Info: The packaging file uses dh-exec, but it does not use /usr/bin/dh-exec.
If running dh-exec with the default set of helpers is not desired,
use its --with or --without options instead of directly using the
desired helper.
+
+Tag: package-uses-dh-exec-but-lacks-build-depends
+Severity: important
+Certainty: possible
+Info: If a package uses dh-exec, it must declare a Build-Depends
+ on it.
diff --git a/t/tests/debhelper-dh-exec/desc b/t/tests/debhelper-dh-exec/desc
index 3abf0ea..3bab222 100644
--- a/t/tests/debhelper-dh-exec/desc
+++ b/t/tests/debhelper-dh-exec/desc
@@ -6,3 +6,4 @@ Options: --suppress-tags
Description: Tests related to executable, dh-exec using packaging files
Test-For:
dh-exec-private-helper
+ package-uses-dh-exec-but-lacks-build-depends
diff --git a/t/tests/debhelper-dh-exec/tags b/t/tests/debhelper-dh-exec/tags
index 4224fd0..f94bb40 100644
--- a/t/tests/debhelper-dh-exec/tags
+++ b/t/tests/debhelper-dh-exec/tags
@@ -1 +1,2 @@
E: debhelper-dh-exec source: dh-exec-private-helper debian/manpages
+E: debhelper-dh-exec source: package-uses-dh-exec-but-lacks-build-depends
--
Debian package checker
Reply to: