1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 801-implement-dbg-checks.dpatch by Eero Häkkinen <eero.hakkinen@nokia.com>
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Require <package>-dbg=<version> to declare dependency on
6 ## DP: <package>=<version>.
9 diff -urNad lintian~/checks/control-file lintian/checks/control-file
10 --- lintian~/checks/control-file 2006-09-21 15:27:18.000000000 +0300
11 +++ lintian/checks/control-file 2006-09-21 15:27:18.000000000 +0300
13 tag "build-info-in-binary-control-file-section", "Package ".$binary_control->{"package"}
14 if ($binary_control->{"build-depends"} || $binary_control->{"build-depends-indep"} ||
15 $binary_control->{"build-conflicts"} || $binary_control->{"build-conflicts-indep"});
17 + tag "dbg-binary-control-file-section-lacks-strict-versioned-dependency", "Package ".$binary_control->{"package"}
18 + if ($binary_control->{"package"} =~ /^(.*)-dbg$/ &&
19 + ($binary_control->{"depends"}||'') !~ /(?:.*,\s*)?\Q$1\E\s*\(\s*=\s*\$\{(?:Source-Version|binary:Version|source:Version)\}\)/);
22 diff -urNad lintian~/checks/control-file.desc lintian/checks/control-file.desc
23 --- lintian~/checks/control-file.desc 2006-09-21 15:27:18.000000000 +0300
24 +++ lintian/checks/control-file.desc 2006-09-21 15:27:18.000000000 +0300
26 The binary section is not used and should thus be removed from
27 the Debian control file.
29 +Tag: dbg-binary-control-file-section-lacks-strict-versioned-dependency
31 +Info: The dbg package section in the control file does not declare
32 + dependency on the binary package of the exact same version.
34 + Debugging symbols are specific to binaries from the same build configuration
35 + thus dbg packages must declare dependency on the correcponding binary
36 + packages of the exact same version.
38 + Thus, the binary control file section of a package `util-dbg' must contain
39 + a field `Depends: util (= ${Source-Version})'.
41 Tag: debian-control-with-duplicate-fields
43 Info: One of the paragraphs of your debian/control contains the same
44 diff -urNad lintian~/checks/fields lintian/checks/fields
45 --- lintian~/checks/fields 2006-09-21 15:27:18.000000000 +0300
46 +++ lintian/checks/fields 2006-09-21 15:27:18.000000000 +0300
51 + tag "dbg-package-lacks-strict-versioned-dependency"
52 + if ($version && $pkg =~ /^(.*)-dbg$/ &&
53 + ($fields{depends}||'') !~ /(?:,\s*)?\Q$1\E\s*\(\s*=\s*\Q$version\E\)/);
55 tag "dbg-package-missing-depends", $debugbase
56 if ($debugpackage && !$debugfound);
58 diff -urNad lintian~/checks/fields.desc lintian/checks/fields.desc
59 --- lintian~/checks/fields.desc 2006-09-21 15:27:18.000000000 +0300
60 +++ lintian/checks/fields.desc 2006-09-21 15:27:18.000000000 +0300
62 Info: This package has a name suggesting that it contains detached
63 debugging symbols. If so, it should have priority "extra" since users
64 normally do not need such packages.
66 +Tag: dbg-package-lacks-strict-versioned-dependency
68 +Info: The dbg package does not declare dependency on the binary package of
69 + the exact same version.
71 + Debugging symbols are specific to binaries from the same build configuration
72 + thus dbg packages must declare dependency on the correcponding binary
73 + packages of the exact same version.