[SCM] Debian package checker branch, master, updated. 2.1.6-33-gf39df20
The following commit has been merged in the master branch:
commit 273ca76e23ceb86c94f859ca6af1825494f7998e
Author: Evgeni Golov <sargentd@die-welt.net>
Date: Sun Jan 18 18:58:04 2009 +0100
shout on people hardcoding libc6 in their debian/control file
One should not hardcode a Depends on libc6 in debian/control,
but use ${shlibs:Depends} for that.
Warn about that.
Closes: #512196
diff --git a/checks/control-file b/checks/control-file
index 019bf79..c8ba92a 100644
--- a/checks/control-file
+++ b/checks/control-file
@@ -122,6 +122,21 @@ for my $control (@binary_controls) {
}
}
+# Check that packages do not hardcode a depend on any variant of libc
+@dep_fields = qw(pre-depends depends);
+my @libcs = qw(libc6 libc6.1 libc0.1 libc0.3);
+for my $control (@binary_controls) {
+ for my $field (0 .. ($#dep_fields)) {
+ next unless $control->{$dep_fields[$field]};
+ my $parsed = Dep::parse ($control->{$dep_fields[$field]});
+ for my $libc (@libcs) {
+ tag "packages-depends-on-hardcoded-libc", $control->{package}, $dep_fields[$field], $libc
+ if Dep::implies($parsed, Dep::parse($libc));
+ }
+
+ }
+}
+
# Check that every package is in the same archive category, except that
# sources in main can deliver both main and contrib packages. The source
# package may or may not have a section specified; if it doesn't, derive the
diff --git a/checks/control-file.desc b/checks/control-file.desc
index d33a69e..5590c0c 100644
--- a/checks/control-file.desc
+++ b/checks/control-file.desc
@@ -132,3 +132,10 @@ Info: The given field in the <tt>debian/control</tt> file has a substvar
syntactically valid, but as soon as the variable has a non-empty value,
the control file will have a syntax error. You probably meant to put a
comma after the substvar expansion.
+
+Tag: packages-depends-on-hardcoded-libc
+Severity: normal
+Certainty: certain
+Info: The given package declares a dependency on libc directly instead
+ of using ${shlibs:Depends} in its <tt>debian/control</tt> stanza.
+
--
Debian package checker
Reply to: