Adding side stream changes to Maemian. Working to integrate full upstream libraries...
[maemian] / nokia-lintian / debian / patches / 800-allow-comments-in-debian-control.dpatch
diff --git a/nokia-lintian/debian/patches/800-allow-comments-in-debian-control.dpatch b/nokia-lintian/debian/patches/800-allow-comments-in-debian-control.dpatch
new file mode 100755 (executable)
index 0000000..d44ddf1
--- /dev/null
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 800-allow-comments-in-debian-control.dpatch by Eero Häkkinen <eero.hakkinen@nokia.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Ignore comments while looking for duplicated fields in debian/control.
+## DP: Comments have been supported since dpkg 1.10.11.
+
+@DPATCH@
+diff -urNad lintian~/checks/control-file lintian/checks/control-file
+--- lintian~/checks/control-file       2006-09-21 15:06:59.000000000 +0300
++++ lintian/checks/control-file        2006-09-21 15:14:04.000000000 +0300
+@@ -46,6 +46,15 @@
+ open (CONTROL, '<', "debfiles/control")
+     or fail "Couldn't read debfiles/control: $!";
+ while (<CONTROL>) {
++      # Patch:
++      # Ignore comments.
++      if (/^#/) {
++              if (/^#\s*[Pp]ackage:\s*(\S*)/) {
++                      tag "debian-control-with-out-commented-binary-section", "Package $1";
++              }
++              next;
++      }
++
+       s/\s*\n$//;
+       next if /^\#/;
+diff -urNad lintian~/checks/control-file.desc lintian/checks/control-file.desc
+--- lintian~/checks/control-file.desc  2006-09-21 15:06:59.000000000 +0300
++++ lintian/checks/control-file.desc   2006-09-21 15:12:48.000000000 +0300
+@@ -25,6 +25,12 @@
+  section.  These specify source package relationships, and should be in
+  the source section of the control file.
++Tag: debian-control-with-out-commented-binary-section
++Type: warning
++Info: The Debian control file contains a binary section which is commented out.
++ The binary section is not used and should thus be removed from
++ the Debian control file.
++
+ Tag: debian-control-with-duplicate-fields
+ Type: error
+ Info: One of the paragraphs of your debian/control contains the same