[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lintian: r1163 - in trunk: checks debian testset



Author: rra
Date: 2008-02-04 03:38:13 +0100 (Mon, 04 Feb 2008)
New Revision: 1163

Modified:
   trunk/checks/fields
   trunk/checks/fields.desc
   trunk/debian/changelog
   trunk/testset/tags.debug
Log:
  + [RA] Check that -dbg packages depend on their base package.  Patch
    from Chris Lamb.  (Closes: #458785)

Modified: trunk/checks/fields
===================================================================
--- trunk/checks/fields	2008-02-04 02:37:03 UTC (rev 1162)
+++ trunk/checks/fields	2008-02-04 02:38:13 UTC (rev 1163)
@@ -409,6 +409,12 @@
 }
 if (($type eq "binary") || ($type eq 'udeb')) {
 	my (%deps, %fields, %parsed);
+	my $debugpackage = 0;
+	my ($debugbase, $debugfound);
+	if ($pkg =~ /^(.*)-dbg$/) {
+		$debugpackage = 1;
+		$debugbase = $1;
+	}
 	for my $field (qw(depends pre-depends recommends suggests conflicts provides replaces)) {
 		if (open(FH, '<', "fields/$field")) {
 			#Get data and clean it
@@ -454,6 +460,11 @@
 						push @{$deps{$d_pkg}}, [$field, $d_version];
 					}
 
+					# We have found a Depends: on our non-dbg equivalent.
+					if ($debugpackage && $field eq "depends" && $d_pkg =~ /^\Q$debugbase/) {
+						$debugfound = 1;
+					}
+
 					tag "versioned-provides", "$part_d_orig"
 					    if ($field eq "provides" && $d_version->[0]);
 
@@ -514,6 +525,9 @@
 		}
 	}
 
+	tag "dbg-package-missing-depends", $debugbase
+		if ($debugpackage && !$debugfound);
+
 	# If Conflicts is set, make sure it's not inconsistent with the other
 	# dependency fields.
 	if ($fields{conflicts}) {

Modified: trunk/checks/fields.desc
===================================================================
--- trunk/checks/fields.desc	2008-02-04 02:37:03 UTC (rev 1162)
+++ trunk/checks/fields.desc	2008-02-04 02:38:13 UTC (rev 1163)
@@ -620,6 +620,14 @@
  becomes Essential, there is no need to depend on it, and until then,
  packages that require Python must depend on python.
 
+Tag: dbg-package-missing-depends
+Type: warning
+Info: This package has a name of the form of "X-dbg", indicating it
+ contains detached debugging symbols for the package X.  If so, it should
+ depend on the corresponding package, generally with (= ${binary:Version})
+ since the debugging symbols are only useful with the binaries created by
+ the same build.
+
 Tag: conflicts-with-dependency
 Type: error
 Ref: 7.3
@@ -662,8 +670,9 @@
 Tag: build-depends-on-build-essential
 Type: error
 Ref: policy 7.6
-Info: You depends on the build-essential package, which is only a meta-package
- depending on build tools that have to be installed in all build environments.
+Info: You depends on the build-essential package, which is only a
+ meta-package depending on build tools that have to be installed in all
+ build environments.
 
 Tag: malformed-python-version
 Type: error

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-02-04 02:37:03 UTC (rev 1162)
+++ trunk/debian/changelog	2008-02-04 02:38:13 UTC (rev 1163)
@@ -20,6 +20,8 @@
       explain the dependency possibilities.  Ignore dh_python if
       debian/pyversion or a Python-Version control field are present.
       Thanks, Loïc Minier.  (Closes: #460625)
+    + [RA] Check that -dbg packages depend on their base package.  Patch
+      from Chris Lamb.  (Closes: #458785)
   * checks/files{.desc,}:
     + [RA] In many of the long descriptions for symlink-related tags,
       mention that running dh_link will fix symlink problems.

Modified: trunk/testset/tags.debug
===================================================================
--- trunk/testset/tags.debug	2008-02-04 02:37:03 UTC (rev 1162)
+++ trunk/testset/tags.debug	2008-02-04 02:38:13 UTC (rev 1163)
@@ -11,4 +11,5 @@
 W: debug source: out-of-date-standards-version 3.7.0 (current is 3.7.3)
 W: hello: binary-without-manpage usr/bin/hello
 W: hello: binary-without-manpage usr/bin/hello.dbg
+W: libhello0-dbg: dbg-package-missing-depends libhello0
 W: libhello0-dbg: shared-lib-without-dependency-information ./usr/lib/libhello.so.dbg


Reply to: