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

[lintian] 04/09: Bail out early if dep 5 not found



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

broucaries-guest pushed a commit to branch master
in repository lintian.

commit d49e841baa60ab70a342a19c9683707e412ce8f1
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date:   Mon Jul 14 22:58:09 2014 +0200

    Bail out early if dep 5 not found
    
    Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
 checks/source-copyright.pm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm
index adc9854..e81b12c 100644
--- a/checks/source-copyright.pm
+++ b/checks/source-copyright.pm
@@ -79,7 +79,7 @@ sub _check_dep5_copyright {
     my (@dep5, @lines);
 
     if (
-        $contents =~ m{
+        $contents !~ m{
                (^ | \n)
                (?i: format(:|[-\s]spec) )
                (?: . | \n\s+ )*
@@ -89,6 +89,9 @@ sub _check_dep5_copyright {
                  | VERSIONED_FORMAT_URL
                ) }x
       ){
+        tag 'no-dep5-copyright';
+        return;
+       }
         # Before trying to parse the copyright as Debian control file, try to
         # determine the format URI.
         my $first_para = $contents;
@@ -185,11 +188,10 @@ sub _check_dep5_copyright {
             tag 'unknown-copyright-format-uri';
             return;
         }
-    }
 
     if (@dep5) {
         _parse_dep5($info,\@dep5,\@lines);
-    }else {
+    } else {
         tag 'no-dep5-copyright';
     }
 }

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


Reply to: