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

[SCM] Debian package checker branch, master, updated. 2.2.5-18-gf8064af



The following commit has been merged in the master branch:
commit ee432c695a44d0a4f52e63e8452ea37a30523707
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Wed Feb 11 23:26:42 2009 -0600

    Detect mismatched icon sizes
    
    Look for png files used as icons with a size that doesn't match the one
    indicated by the directory under which they were installed.

diff --git a/checks/files b/checks/files
index ad60222..fd73213 100644
--- a/checks/files
+++ b/checks/files
@@ -390,6 +390,14 @@ foreach my $file (sort keys %{$info->index}) {
 	    tag "desktop-file-in-wrong-dir", $file;
 	}
 
+	# ---------------- png files under /usr/share/apps/*/icons/*
+	elsif ($file =~ m,^usr/share/apps/[^/]+/icons/[^/]+/(\d+x\d+)/.*\.png$,) {
+	    my ($dsize, $fsize) = ($1);
+	    $info->file_info->{$file} =~ m/,\s*(\d+)\s*x\s*(\d+)\s*,/;
+	    $fsize = $1.'x'.$2;
+	    tag 'icon-size-and-directory-name-mismatch', $file, $fsize
+		unless ($dsize eq $fsize);
+	}
     }
     # ---------------- /var subdirs
     elsif ($type ne 'udeb' and $file =~ m,^var/[^/]+/$,) { # FSSTND dirs
diff --git a/checks/files.desc b/checks/files.desc
index cfcdcb7..1e51bbe 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -3,7 +3,7 @@ Author: Christian Schwarz <schwarz@debian.org>
 Abbrev: fil
 Type: binary, udeb
 Unpack-Level: 2
-Needs-Info: objdump-info, scripts
+Needs-Info: objdump-info, scripts, file-info
 Info: This script checks if a binary package conforms to policy
  WRT to files and directories.
 
@@ -951,3 +951,9 @@ Info: This package appears to include a font file that is already provided
  font package.  If the application in this package loads the font file by
  name, you may need to include a symlink pointing to the file name of the
  font in its Debian package.
+
+Tag: icon-size-and-directory-name-mismatch
+Severity: normal
+Certainty: certain
+Info: The icon has a size that differs from the size specified by the name of
+ the directory under which it was installed.

-- 
Debian package checker


Reply to: