Adding side stream changes to Maemian. Working to integrate full upstream libraries...
[maemian] / nokia-lintian / debian / patches / 801-implement-dbg-checks.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 801-implement-dbg-checks.dpatch by Eero Häkkinen <eero.hakkinen@nokia.com>
3 ##
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>.
7
8 @DPATCH@
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
12 @@ -84,5 +84,9 @@
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"});
16 +
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)\}\)/);
20  }
21  
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
25 @@ -31,6 +31,18 @@
26   The binary section is not used and should thus be removed from
27   the Debian control file.
28  
29 +Tag: dbg-binary-control-file-section-lacks-strict-versioned-dependency
30 +Type: error
31 +Info: The dbg package section in the control file does not declare
32 + dependency on the binary package of the exact same version.
33 + .
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.
37 + .
38 + Thus, the binary control file section of a package `util-dbg' must contain
39 + a field `Depends: util (= ${Source-Version})'.
40 +
41  Tag: debian-control-with-duplicate-fields
42  Type: error
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
47 @@ -555,6 +555,10 @@
48                 }
49         }
50  
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\)/);
54 +
55         tag "dbg-package-missing-depends", $debugbase
56                 if ($debugpackage && !$debugfound);
57
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
61 @@ -753,3 +753,12 @@
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.
65 +
66 +Tag: dbg-package-lacks-strict-versioned-dependency
67 +Type: error
68 +Info: The dbg package does not declare dependency on the binary package of
69 + the exact same version.
70 + .
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.