[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.3.0-51-gb8c935d



The following commit has been merged in the master branch:
commit b8c935dd5cca2c5fe4a6e950381d5e12b401952c
Author: Russ Allbery <rra@debian.org>
Date:   Fri Jan 1 21:49:50 2010 -0800

    Check that NEWS.Debian entries are followed by a blank line
    
    * checks/changelog-file{,.desc}:
      + [RA] Check that the most recent NEWS.Debian entry is followed by a
        blank line for apt-listchanges.  Thanks, Adeodato Simó.  (Addresses
        the Lintian part of #523436)

diff --git a/checks/changelog-file b/checks/changelog-file
index cfa8991..a9d1ba8 100644
--- a/checks/changelog-file
+++ b/checks/changelog-file
@@ -139,8 +139,8 @@ if ($#doc_files < 0) {
     return 0;
 }
 
-# Check a NEWS.Debian file if we have one.  Save the version, distribution,
-# and urgency for later checks against the changelog file.
+# Check a NEWS.Debian file if we have one.  Save the parsed version of the
+# flie for later checks against the changelog file.
 my $news;
 if (-f 'NEWS.Debian') {
     my $line = file_is_encoded_in_non_utf8('NEWS.Debian', $type, $pkg);
@@ -165,6 +165,20 @@ if (-f 'NEWS.Debian') {
 	    tag 'debian-news-entry-uses-asterisk';
 	}
     }
+
+    # Check that the most recent trailer line in NEWS.Debian is followed by a
+    # blank line due to a current bug in apt-listchanges that otherwise
+    # doesn't show a blank line between entries from other packages.
+    open(IN, '<', 'NEWS.Debian')
+	or fail("cannot open NEWS.Debian for $type package $pkg");
+    local $_;
+    while (<IN>) {
+	last if /^ --/;
+    }
+    my $next = <IN>;
+    tag 'debian-news-entry-without-blank-line', "line " . ($. - 1)
+	unless $next =~ /^\s*$/;
+    close IN;
 }
 
 if ( $found_html && !$found_text ) {
diff --git a/checks/changelog-file.desc b/checks/changelog-file.desc
index 1891df7..19f98b1 100644
--- a/checks/changelog-file.desc
+++ b/checks/changelog-file.desc
@@ -269,6 +269,20 @@ Info: The latest entry in NEWS.Debian appears to use asterisks to present
  NEWS.Debian rather than a bulleted list.
 Ref: devref 6.3.4
 
+Tag: debian-news-entry-without-blank-line
+Severity: minor
+Certainty: possible
+Info: There appears to be no blank line after the most recent
+ <tt>NEWS.Debian</tt> entry.
+ .
+ The current <tt>apt-listchanges</tt> takes the blank that separates
+ entries for different packages from the blank line following the trailer
+ line of each <tt>NEWS.Debian</tt> file.  This means that unless there is
+ a blank line after an entry, it may be displayed to the user without a
+ blank line between it and entries from other packages.  Please add a
+ blank line (which, if this is the only entry in the file, may mean adding
+ a trailing blank line).
+
 Tag: spelling-error-in-changelog
 Severity: minor
 Certainty: certain
diff --git a/debian/changelog b/debian/changelog
index a34310d..a82beeb 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ lintian (2.3.1) UNRELEASED; urgency=low
     + Added:
       - init.d-script-missing-start
       - debian-news-entry-uses-asterisk
+      - debian-news-entry-without-blank-line
       - non-native-package-with-native-version
 
   * {checks,collection}/*.desc:
@@ -16,6 +17,9 @@ lintian (2.3.1) UNRELEASED; urgency=low
   * checks/changelog-file{,.desc}:
     + [RA] Per devref, recommend against NEWS.Debian entries formatted
       with asterisks like changelog entries.
+    + [RA] Check that the most recent NEWS.Debian entry is followed by a
+      blank line for apt-listchanges.  Thanks, Adeodato Simó.  (Addresses
+      the Lintian part of #523436)
   * checks/cruft:
     + [RA] Fix the regex to properly ignore CMakeCache.txt in the debian
       directory.  Thanks, Aaron M. Ucko.  (Closes: #553264)
diff --git a/t/tests/changelog-file-news-general/debian/debian/NEWS b/t/tests/changelog-file-news-general/debian/debian/NEWS
index 8994cdf..6132905 100644
--- a/t/tests/changelog-file-news-general/debian/debian/NEWS
+++ b/t/tests/changelog-file-news-general/debian/debian/NEWS
@@ -4,7 +4,6 @@ changelog-file-news-general (1.0) UNRELEASED; urgency=high
     has an ISO 8859-1 character: � and a speling error.
 
  -- Russ Allbery <rra@debian.org>  Fri, 01 Jan 2010 20:57:15 -0800
-
 changelog-file-news-general (0.9) unstable; urgency=low
 
   Another entry, this one with a syntax error in the date.
diff --git a/t/tests/changelog-file-news-general/desc b/t/tests/changelog-file-news-general/desc
index e946f28..305883f 100644
--- a/t/tests/changelog-file-news-general/desc
+++ b/t/tests/changelog-file-news-general/desc
@@ -6,6 +6,7 @@ Test-For:
  changelog-news-debian-mismatch
  debian-news-entry-has-strange-distribution
  debian-news-entry-uses-asterisk
+ debian-news-entry-without-blank-line
  debian-news-file-uses-obsolete-national-encoding
  spelling-error-in-news-debian
  syntax-error-in-debian-news-file
diff --git a/t/tests/changelog-file-news-general/tags b/t/tests/changelog-file-news-general/tags
index cc3de1f..337db7a 100644
--- a/t/tests/changelog-file-news-general/tags
+++ b/t/tests/changelog-file-news-general/tags
@@ -1,8 +1,9 @@
 E: changelog-file-news-general: debian-news-file-uses-obsolete-national-encoding at line 4
 I: changelog-file-news-general: debian-news-entry-uses-asterisk
+I: changelog-file-news-general: debian-news-entry-without-blank-line line 6
 W: changelog-file-news-general: changelog-news-debian-mismatch distribution unstable != UNRELEASED
 W: changelog-file-news-general: changelog-news-debian-mismatch urgency low != high
 W: changelog-file-news-general: debian-news-entry-has-strange-distribution UNRELEASED
 W: changelog-file-news-general: spelling-error-in-news-debian speling spelling
-W: changelog-file-news-general: syntax-error-in-debian-news-file line 12 "badly formatted trailer line"
-W: changelog-file-news-general: syntax-error-in-debian-news-file line 12 "found eof where expected more change data or trailer"
+W: changelog-file-news-general: syntax-error-in-debian-news-file line 11 "badly formatted trailer line"
+W: changelog-file-news-general: syntax-error-in-debian-news-file line 11 "found eof where expected more change data or trailer"

-- 
Debian package checker


Reply to: