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

[lintian] 01/02: c/src-cpy.pm: Fix false-positive (#779866)



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 8d6acfc3761178ba2ed215bb80abb19d085bf9ac
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Mar 15 21:39:41 2015 +0100

    c/src-cpy.pm: Fix false-positive (#779866)
    
    Reported-by: Dr. Helge Kreutzmann <debian@helgefjell.de>
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/source-copyright.pm                                    |  4 ++--
 .../source-copyright-license-header/debian/debian/copyright   | 11 ++++++++++-
 t/tests/source-copyright-license-header/tags                  |  2 +-
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm
index 9d7644b..6714383 100644
--- a/checks/source-copyright.pm
+++ b/checks/source-copyright.pm
@@ -255,7 +255,7 @@ sub _parse_dep5 {
     }
     if(defined($full_license_header)) {
         for (@short_licenses_header) {
-            $standalone_licenses{$_} = 1;
+            $standalone_licenses{$_} = -1;
             $full_licenses_seen{$_} = 1;
         }
     }
@@ -443,7 +443,7 @@ sub _parse_dep5 {
         if (not defined $standalone_licenses{$license}) {
             tag 'missing-license-paragraph-in-dep5-copyright', $license,
               "(paragraph at line $lines[$i]{'START-OF-PARAGRAPH'})";
-        } elsif ($standalone_licenses{$license} == 1) {
+        } elsif ($standalone_licenses{$license} == -1) {
             tag 'dep5-file-paragraph-reference-header', $license,
               "(paragraph at line $lines[$i]{'START-OF-PARAGRAPH'})";
         }
diff --git a/t/tests/source-copyright-license-header/debian/debian/copyright b/t/tests/source-copyright-license-header/debian/debian/copyright
index f191cbf..5085cf1 100644
--- a/t/tests/source-copyright-license-header/debian/debian/copyright
+++ b/t/tests/source-copyright-license-header/debian/debian/copyright
@@ -5,8 +5,14 @@ Source: http://examples.com/doohickey/source/
 License: public-domain
  some public-domain
 
+License: golf
+ blah blah
+ This should not trigger a dep5-file-paragraph-reference-header
+ tag.
+
 Files: *
-Comment: An old false positive see #766118
+Comment: An old false positive see #766118.  This should instead
+ trigger a dep5-file-paragraph-reference-header
 Copyright: 2014, somebody
 License: public-domain
 
@@ -15,3 +21,6 @@ Copyright: 2014, somebody1
 License: this
  this is a valid license short name
 
+Files: debian/compat
+Copyright: 2015, somebody2
+License: golf
diff --git a/t/tests/source-copyright-license-header/tags b/t/tests/source-copyright-license-header/tags
index 36dc1a2..75395c5 100644
--- a/t/tests/source-copyright-license-header/tags
+++ b/t/tests/source-copyright-license-header/tags
@@ -1 +1 @@
-W: source-copyright-license-header source: dep5-file-paragraph-reference-header public-domain (paragraph at line 8)
+W: source-copyright-license-header source: dep5-file-paragraph-reference-header public-domain (paragraph at line 13)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: