[lintian] 01/01: Emit new empty-section-field tag instead of uninitialized value warnings on an empty "Section:" field. (Closes: #878515)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit 8e5b05587f58c757cfe88cb095ca77805c181c66
Author: Chris Lamb <lamby@debian.org>
Date: Tue Oct 24 23:12:06 2017 -0400
Emit new empty-section-field tag instead of uninitialized value warnings on an empty "Section:" field. (Closes: #878515)
---
checks/fields.desc | 6 ++++++
checks/fields.pm | 4 +++-
debian/changelog | 2 ++
t/debs/fields-general-bad/control | 2 +-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/checks/fields.desc b/checks/fields.desc
index 2ada4c0..da6cfc6 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1331,3 +1331,9 @@ Info: Since Debian Policy version 4.0.1, the priority <tt>extra</tt>
Please update <tt>debian/control</tt> and replace all instances of
<tt>Priority: extra</tt> with <tt>Priority: optional</tt>.
Ref: policy 2.5
+
+Tag: empty-section-field
+Severity: normal
+Certainty: certain
+Info: The "Section:" field in this package's control file is empty.
+Ref: policy 2.4
diff --git a/checks/fields.pm b/checks/fields.pm
index 3a5de15..9dbeb2e 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -520,13 +520,15 @@ sub run {
tag 'wrong-section-for-udeb', $section;
}
} else {
- my @parts = split(m{/}, $section, 2);
+ my @parts = split(m{/}, $section, 2) || ('');
if (scalar @parts > 1) {
tag 'unknown-section', $section
unless $KNOWN_ARCHIVE_PARTS{$parts[0]};
tag 'unknown-section', $section
unless $KNOWN_SECTIONS->known($parts[1]);
+ } elsif ($parts[0] eq '') {
+ tag 'empty-section-field';
} elsif ($parts[0] eq 'unknown') {
tag 'section-is-dh_make-template';
} else {
diff --git a/debian/changelog b/debian/changelog
index 2d64e4d..e5d9b00 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,8 @@ lintian (2.5.56) UNRELEASED; urgency=medium
* checks/fields.pm:
+ [CL] Apply patch from Nicolas Boulenguez to accept and recommend the
new vcs-mtn mtn:// uri format. (Closes: #878798)
+ + [CL] Emit new empty-section-field tag instead of uninitialized value
+ warnings on an empty "Section:" field. (Closes: #878515)
* checks/init.d.pm:
+ [CL] Check for files that use content from the /etc/init.d/skeleton
template. Thanks to Christoph Biedl for the idea. (Closes: #879152)
diff --git a/t/debs/fields-general-bad/control b/t/debs/fields-general-bad/control
index a23dd29..4fbd0ee 100644
--- a/t/debs/fields-general-bad/control
+++ b/t/debs/fields-general-bad/control
@@ -3,7 +3,7 @@ Source: fields-general-bad
Version: 1.0?
Architecture: weird i386 amd64
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
-Section: devel
+Section:
Priority: is
weird
Unknown-Field: Hallo World
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: