#! /bin/sh /usr/share/dpatch/dpatch-run ## 800-allow-comments-in-debian-control.dpatch by Eero Häkkinen ## ## 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 () { + # 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