Added some code to peer into a data structure in Maemian/Schedule.pm. Also added the
[maemian] / nokia-lintian / debian / patches / 800-allow-comments-in-debian-control.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 800-allow-comments-in-debian-control.dpatch by Eero Häkkinen <eero.hakkinen@nokia.com>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Ignore comments while looking for duplicated fields in debian/control.
6 ## DP: Comments have been supported since dpkg 1.10.11.
7
8 @DPATCH@
9 diff -urNad lintian~/checks/control-file lintian/checks/control-file
10 --- lintian~/checks/control-file        2006-09-21 15:06:59.000000000 +0300
11 +++ lintian/checks/control-file 2006-09-21 15:14:04.000000000 +0300
12 @@ -46,6 +46,15 @@
13  open (CONTROL, '<', "debfiles/control")
14      or fail "Couldn't read debfiles/control: $!";
15  while (<CONTROL>) {
16 +       # Patch:
17 +       # Ignore comments.
18 +       if (/^#/) {
19 +               if (/^#\s*[Pp]ackage:\s*(\S*)/) {
20 +                       tag "debian-control-with-out-commented-binary-section", "Package $1";
21 +               }
22 +               next;
23 +       }
24 +
25         s/\s*\n$//;
26         next if /^\#/;
27  
28 diff -urNad lintian~/checks/control-file.desc lintian/checks/control-file.desc
29 --- lintian~/checks/control-file.desc   2006-09-21 15:06:59.000000000 +0300
30 +++ lintian/checks/control-file.desc    2006-09-21 15:12:48.000000000 +0300
31 @@ -25,6 +25,12 @@
32   section.  These specify source package relationships, and should be in
33   the source section of the control file.
34  
35 +Tag: debian-control-with-out-commented-binary-section
36 +Type: warning
37 +Info: The Debian control file contains a binary section which is commented out.
38 + The binary section is not used and should thus be removed from
39 + the Debian control file.
40 +
41  Tag: debian-control-with-duplicate-fields
42  Type: error
43  Info: One of the paragraphs of your debian/control contains the same