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

[SCM] Debian package checker branch, master, updated. 2.2.0-27-gae9eeae



The following commit has been merged in the master branch:
commit 69e6c1b31cd8ccde1bafd19683da88c5cd40f2a6
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Wed Jan 28 00:55:56 2009 -0600

    Use binary_control in checks/fields for architecture
    
    Make the relation checks in source read the binary packages' fields via
    Lintian::Collect::Source.
    
    Signed-off-by: Raphael Geissert <atomo64@gmail.com>

diff --git a/checks/fields b/checks/fields
index 80e256a..fbc821f 100644
--- a/checks/fields
+++ b/checks/fields
@@ -595,19 +595,17 @@ if (($type eq "binary") || ($type eq 'udeb')) {
 
 if ($type eq "source") {
 
+	my $binpkgs = $info->binaries;
+
 	#Get number of arch-indep packages:
 	my $arch_indep_packages = 0;
 	my $arch_dep_packages = 0;
-	if (not open(CONTROL, '<', "debfiles/control")) {
-		fail("Can't open debfiles/control: $!");
-	} else {
-		local $/ = "\n"; #Read this linewise
-		while (<CONTROL>) {
-			if (/^Architecture: all/) {
-				$arch_indep_packages++;
-			} elsif (/^Architecture:/) {
-				$arch_dep_packages++;
-			}
+	foreach my $binpkg (keys %$binpkgs) {
+		my $arch = $info->binary_field($binpkg, 'architecture');
+		if ($arch eq 'all') {
+			$arch_indep_packages++;
+		} else {
+			$arch_dep_packages++;
 		}
 	}
 

-- 
Debian package checker


Reply to: