The following commit has been merged in the master branch:
commit bdedb44f6a339dc86c1f82c9b1513c0cdb5c9a5c
Author: Raphael Geissert <[email protected]>
Date:   Wed Feb 18 23:36:27 2009 -0600

    Special-case objects under lib32/lib64 and /emul to avoid false positives

diff --git a/checks/binaries b/checks/binaries
index 1aaaa35..fff8338 100644
--- a/checks/binaries
+++ b/checks/binaries
@@ -28,6 +28,8 @@ use File::Spec;
 # Table based on checks/emdebian' %archdetecttable, as found in
 # emdebian-tools
 our %archselftable = (
+       '32' => qr'ELF 32-bit',
+       '64' => qr'ELF 64-bit',
        'alpha' => qr'ELF 64-bit LSB .* Alpha',
        'amd64' => qr'ELF 64-bit LSB .* x86-64, .* (?:GNU/Linux|(?!GNU))',
        'arm' => qr'ELF 32-bit LSB .* ARM, version \d,',
@@ -43,6 +45,8 @@ our %archselftable = (
        'm68k' => qr'ELF 32-bit MSB .* 680[02]0',
        'mips' => qr'ELF 32-bit MSB .* MIPS',
        'mipsel' => qr'ELF 32-bit LSB .* MIPS',
+       'mips64' => qr'ELF 64-bit MSB .* MIPS',
+       'mipsel64' => qr'ELF 64-bit LSB .* MIPS',
        'powerpc' => qr'ELF 32-bit MSB .* PowerPC',
        'powerpc64' => qr'ELF 64-bit MSB .* PowerPC',
        's390' => qr'ELF 32-bit MSB .* S.390',
@@ -154,6 +158,8 @@ foreach (sort keys %{$info->file_info}) {
     $directories{"/$_"}++;
 }
 
+exists($archselftable{$arch}) or warn("Unknown architecture $arch");
+
 # process all files in package
 foreach my $file (sort keys %{$info->file_info}) {
     my $fileinfo = $info->file_info->{$file};
@@ -188,10 +194,15 @@ foreach my $file (sort keys %{$info->file_info}) {
     }
 
     if ($arch ne 'all' and $fileinfo !~ m/$archselftable{$arch}/) {
-       $multiarch = Lintian::Data->new('binaries/multiarch')
-           unless defined($multiarch);
-       tag "binary-from-other-architecture", $file
-           unless (grep { $file =~ m,/\Q$_\E/, } $multiarch->all);
+       if ($file =~ m,/lib(\d{2})/, or $file =~ m,/emul/ia(\d{2}),) {
+           tag "binary-from-other-architecture", $file
+               unless ($fileinfo =~ m/$archselftable{$1}/);
+       } else {
+           $multiarch = Lintian::Data->new('binaries/multiarch')
+               unless defined($multiarch);
+           tag "binary-from-other-architecture", $file
+               unless (grep { $file =~ m,/\Q$_\E/, } $multiarch->all);
+       }
     }
 
     # stripped?

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to