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

[SCM] Debian package checker branch, master, updated. 2.5.3-50-g7e375d1



The following commit has been merged in the master branch:
commit 7e375d10b43d2b9dd683222c1cc3e08f12215d3c
Author: Jakub Wilk <jwilk@debian.org>
Date:   Sat Oct 8 08:42:44 2011 +0200

    Improve wording for source-copyright-dep5-syntax-error
    
    Acked-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/source-copyright b/checks/source-copyright
index 3dd9a62..e36e954 100644
--- a/checks/source-copyright
+++ b/checks/source-copyright
@@ -132,7 +132,9 @@ if (m{
                     @dep5 = read_dpkg_control($copyright_filename);
                 };
                 if ($@) {
+                    chomp $@;
                     $@ =~ s/^internal error: //;
+                    $@ =~ s/^syntax error in //;
                     tag 'syntax-error-in-dep5-copyright', $@;
                 }
             }
diff --git a/debian/changelog b/debian/changelog
index e20a630..7e7c61b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -48,6 +48,8 @@ lintian (2.5.4) UNRELEASED; urgency=low
       Laurent Arnoud.
   * checks/source-copyright:
     + [JW] Added some more DEP-5 URLs.  (Closes: #642027)
+    + [JW] Improved the wording of the extra information for the tag
+      syntax-error-in-dep5-copyright.  (Closes: #644556)
 
   * data/changelog-file/ubuntu-dists:
     + [NT] Added the "precise".  Thanks to Loïc Minier for the
@@ -83,6 +85,8 @@ lintian (2.5.4) UNRELEASED; urgency=low
       Thanks to Pino Toscano for reporting the issue.
     + [JW] Explicitly check that files are not encoded using ISO-2022,
       when they should be encoded with UTF-8.  (Closes: #643009)
+    + [JW] Use "paragraph" and "field" rather than "section" and "tag"
+      when referring to a Debian control file.
 
   * reporting/*:
     + [NT] Recognise and display pedantic tags.
diff --git a/lib/Util.pm b/lib/Util.pm
index 2fcf7d8..25001bd 100644
--- a/lib/Util.pm
+++ b/lib/Util.pm
@@ -138,7 +138,7 @@ sub _parse_dpkg_control_iterative {
         }
         # continued field?
         elsif (m/^([ \t].*)$/o) {
-            $open_section or fail("syntax error in section $cur_section after the tag $last_tag: $_");
+            $open_section or fail("syntax error in paragraph $cur_section after the field $last_tag: $_");
 
             # Policy: Many fields' values may span several lines; in this case
             # each continuation line must start with a space or a tab.  Any
@@ -150,8 +150,8 @@ sub _parse_dpkg_control_iterative {
         }
         # None of the above => syntax error
         else {
-            my $message = "syntax error in section $cur_section";
-            $message.= " after the tag $last_tag: $_" if defined $last_tag;
+            my $message = "syntax error in paragraph $cur_section";
+            $message.= " after the field $last_tag: $_" if defined $last_tag;
             fail($message);
         }
     }
diff --git a/t/tests/source-copyright-dep5-syntax-error/tags b/t/tests/source-copyright-dep5-syntax-error/tags
index 6a7686b..13f2420 100644
--- a/t/tests/source-copyright-dep5-syntax-error/tags
+++ b/t/tests/source-copyright-dep5-syntax-error/tags
@@ -1 +1 @@
-W: source-copyright-dep5-syntax-error source: syntax-error-in-dep5-copyright syntax error in section 2 after the tag license:  This package is distributed in the hope that it will be useful, but WITHOUT\n
+W: source-copyright-dep5-syntax-error source: syntax-error-in-dep5-copyright paragraph 2 after the field license:  This package is distributed in the hope that it will be useful, but WITHOUT

-- 
Debian package checker


Reply to: