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

[lintian] 06/09: Bail out early if dep 5 found but no uri



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

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

commit 5ce3e4229bc07469578fcc0b6b8c4c544d1725dd
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date:   Mon Jul 14 22:59:29 2014 +0200

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

diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm
index 791526a..2825485 100644
--- a/checks/source-copyright.pm
+++ b/checks/source-copyright.pm
@@ -92,6 +92,7 @@ sub _check_dep5_copyright {
         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;
@@ -105,7 +106,10 @@ sub _check_dep5_copyright {
     $uri =~ s/^([^#\s]+)#/$1/
       if defined $uri;   # strip fragment identifier
 
-    if (defined $uri) {
+    if (!defined $uri) {
+        tag 'unknown-copyright-format-uri';
+        return;
+    }
         # Note that we allow people to use "https://"; even the
         # policy says it must be "http://";.  It might be
         # pedantically wrong, but it is not worth arguing over On
@@ -184,10 +188,6 @@ sub _check_dep5_copyright {
                 return;
             }
         }
-    }else {
-        tag 'unknown-copyright-format-uri';
-        return;
-    }
 
     if (@dep5) {
         _parse_dep5($info,\@dep5,\@lines);

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


Reply to: