Added some code to peer into a data structure in Maemian/Schedule.pm. Also added the
[maemian] / nokia-lintian / debian / patches / 807-correspondent-docs-to-devs-check.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 807_correspondent_docs_to_devs.dpatch by Dmitry Rozhkov <dmitry.rozhkov@nokia.com>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: An additional check for having doc packages for every dev package
6
7 @DPATCH@
8
9 Index: checks/control-file.desc
10 ===================================================================
11 --- lintian.old/checks/control-file.desc        (revision 6821)
12 +++ lintian.new/checks/control-file.desc        (working copy)
13 @@ -85,3 +85,9 @@
14   silently fix this problem by removing the dependency, but it may indicate
15   a more subtle bug (misspelling or cutting and pasting the wrong package
16   name).
17 +
18 +Tag: correspondent-doc-package-absent
19 +Type: warning
20 +Info: The given develepment package doesn't have a corresponding
21 +  documentation package which is supposed to describe the API
22 +  provided by the development package.
23 Index: checks/control-file
24 ===================================================================
25 --- lintian.old/checks/control-file     (revision 6821)
26 +++ lintian.new/checks/control-file     (working copy)
27 @@ -135,8 +135,25 @@
28                 if (!$category && $binary_control->{'section'} =~ m%^([^/]+)/% && $1 ne 'contrib');
29  }
30  
31 +# Check that all -dev packages are submitted to repository together with 
32 +# correspondent -doc packages
33 +my (@dev_bins, %doc_bins);
34 +for my $binary_control (@binary_controls){
35 +       if ($binary_control->{'package'} =~ m/^([\w|-]+)-dev$/){
36 +               push @dev_bins, $1;
37 +       }
38 +       if ($binary_control->{'package'} =~ m/^([\w|-]+)-doc$/){
39 +               $doc_bins{$1} = 1;
40 +       }
41  }
42 +for my $dev_bin (@dev_bins){
43 +       if (! defined ($doc_bins{$dev_bin})){
44 +               tag "correspondent-doc-package-absent", "Package $dev_bin-dev";
45 +       }
46 +}
47  
48 +}
49 +
50  1;
51  
52  # Local Variables: