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

[SCM] Debian package checker branch, master, updated. 2.5.2-84-g2b8f943



The following commit has been merged in the master branch:
commit 2b8f9431f1b783d56dfd06ede71e3d7fa31c51ee
Author: Jakub Wilk <jwilk@debian.org>
Date:   Sat Sep 3 19:59:39 2011 +0200

    Reuse existing variable instead of querying $info->field
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/files b/checks/files
index 836cc58..033438b 100644
--- a/checks/files
+++ b/checks/files
@@ -783,9 +783,8 @@ foreach my $file (@{$info->sorted_index}) {
         # check if it's one of the Python proper packages
 	unless (defined $is_python) {
 	    $is_python = 0;
-	    if (defined $info->field('source')) {
-		local $_ = $info->field('source');
-		$is_python = 1 if /^python(?:\d\.\d)?(?:$|\s)/;
+	    if ($source_pkg) {
+		$is_python = 1 if $source_pkg =~ m/^python(?:\d\.\d)?(?:$|\s)/;
 	    }
 	}
 	tag 'third-party-package-in-python-dir', $file
@@ -796,9 +795,8 @@ foreach my $file (@{$info->sorted_index}) {
        # check if it's the "perl" package itself
        unless (defined $is_perl) {
            $is_perl = 0;
-	   if (defined $info->field('source')) {
-               local $_ = $info->field('source');;
-               $is_perl = 1 if /^perl(?:$|\s)/;
+	   if ($source_pkg) {
+               $is_perl = 1 if $source_pkg =~ m/^perl(?:$|\s)/;
            }
        }
        tag 'perl-module-in-core-directory', $file

-- 
Debian package checker


Reply to: