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

[lintian] 03/04: c/files: Merge a few if-statements



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

nthykier pushed a commit to branch master
in repository lintian.

commit 968369ede47f69648a51604bc03bbf922fe4d928
Author: Niels Thykier <niels@thykier.net>
Date:   Fri Apr 29 19:51:31 2016 +0000

    c/files: Merge a few if-statements
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/files.pm | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/checks/files.pm b/checks/files.pm
index 255d8e4..856ca4a 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -1857,13 +1857,15 @@ sub run {
     # any binary to save ourselves from game-data false positives:
     my $games = dir_counts($info, 'usr/games/');
     my $other = dir_counts($info, 'bin/') + dir_counts($info, 'usr/bin/');
-    if ($pkg_section =~ m,games$, and $games == 0 and $other > 0) {
-        tag 'package-section-games-but-contains-no-game';
-    }
-    if ($pkg_section =~ m,games$, and $games > 0 and $other > 0) {
-        tag 'package-section-games-but-has-usr-bin';
-    }
-    if ($pkg_section !~ m,games$, and $games > 0 and $other == 0) {
+    if ($other) {
+        if ($pkg_section =~ m,games$,) {
+            if ($games) {
+                tag 'package-section-games-but-has-usr-bin';
+            } else {
+                tag 'package-section-games-but-contains-no-game';
+            }
+        }
+    } elsif ($games > 0 and $pkg_section !~ m,games$,) {
         tag 'games-package-should-be-section-games';
     }
 

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


Reply to: