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

[SCM] Debian package checker branch, master, updated. 2.5.2-87-g8085a8e



The following commit has been merged in the master branch:
commit 8085a8ecf116bb0ccd71b5cd36e12b9f896e9f1f
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Sep 3 20:34:26 2011 +0200

    Use $proc->pkg_src rather than $info->field('source')
    
    $proc->pkg_src never includes the version, which allows some
    simplifications to regexes.

diff --git a/checks/files b/checks/files
index d11209d..743f25e 100644
--- a/checks/files
+++ b/checks/files
@@ -160,6 +160,7 @@ sub run {
 my $pkg = shift;
 my $type = shift;
 my $info = shift;
+my $proc = shift;
 
 my $file;
 my $source_pkg;
@@ -188,9 +189,11 @@ foreach my $file (sort keys %{$info->objdump_info}) {
 
 # Get source package name, if possible.
 #
+# Note: $proc->pkg_src never includes the source version.
+#
 # Otherwise set it to the empty string to avoid "unitialized value"
 # warnings if we end up using it a bit too carelessly.
-$source_pkg = $info->field('source')//'';
+$source_pkg = $proc->pkg_src()//'';
 
 # Get section if available.
 $pkg_section = $info->field('section')//'';
@@ -783,7 +786,7 @@ foreach my $file (@{$info->sorted_index}) {
 	unless (defined $is_python) {
 	    $is_python = 0;
 	    if ($source_pkg) {
-		$is_python = 1 if $source_pkg =~ m/^python(?:\d\.\d)?(?:$|\s)/;
+		$is_python = 1 if $source_pkg =~ m/^python(?:\d\.\d)?$/;
 	    }
 	}
 	tag 'third-party-package-in-python-dir', $file
@@ -795,7 +798,7 @@ foreach my $file (@{$info->sorted_index}) {
        unless (defined $is_perl) {
            $is_perl = 0;
 	   if ($source_pkg) {
-               $is_perl = 1 if $source_pkg =~ m/^perl(?:$|\s)/;
+               $is_perl = 1 if $source_pkg eq 'perl';
            }
        }
        tag 'perl-module-in-core-directory', $file

-- 
Debian package checker


Reply to: