lintian: r83 - trunk/checks
Author: djpig
Date: 2004-03-04 20:50:25 +0100 (Thu, 04 Mar 2004)
New Revision: 83
Modified:
trunk/checks/huge-usr-share
Log:
Make a two step test:
1) if greater than soft_limit and greater than perc_limit
or 2) if greater than hard_limit.
Setting soft/hard/perc limits to 1MB/2MB/50%
(Not yet tested on the archive)
Modified: trunk/checks/huge-usr-share
===================================================================
--- trunk/checks/huge-usr-share 2004-03-02 22:54:14 UTC (rev 82)
+++ trunk/checks/huge-usr-share 2004-03-04 19:50:25 UTC (rev 83)
@@ -27,7 +27,9 @@
# Treshold in kB of /usr/share to trigger this warning
# Consider that the changelog alone can be quite big, and cannot be moved away
-my $TRESHOLD = 250;
+my $TRESHOLD_SIZE_SOFT = 1024;
+my $TRESHOLD_SIZE_HARD = 2048;
+my $TRESHOLD_PERC = 50;
my $arch;
@@ -48,9 +50,12 @@
$size_usrshare =~ s/\t.*//;
$size_usrshare = int $size_usrshare;
-if ($size_usrshare > $TRESHOLD) {
- my $perc = int (100 * $size_usrshare / $size);
+if ($size_usrshare > $TRESHOLD_SIZE_SOFT) {
+ my $perc = int (100 * $size_usrshare / $size);
+ if (($size_usrshare > $TRESHOLD_SIZE_HARD)
+ || ($perc > $TRESHOLD_PERC)) {
print "W: $pkg $type: arch-dep-package-has-big-usr-share ${size_usrshare}kB $perc%\n";
+ }
}
exit 0;
Reply to: