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

[SCM] Debian package checker branch, master, updated. 2.2.18-78-gd81a343



The following commit has been merged in the master branch:
commit 8aa662e54c03f4c0a9cbc4d8b95f9b575ba7dd9d
Author: Russ Allbery <rra@debian.org>
Date:   Fri Dec 25 16:51:07 2009 -0800

    Increase and document huge-usr-share thresholds
    
    * checks/huge-usr-share{,.desc}:
      + [RA] Increase the thresholds to 2MB (over 50%) and 4MB (any
        percentage), and mention the thresholds in the tag description.
        Thanks, Christoph Egger.  (Closes: #561720)
    
    Also add a test suite for this and update the test coverage.

diff --git a/checks/huge-usr-share b/checks/huge-usr-share
index ab6745f..0186d90 100644
--- a/checks/huge-usr-share
+++ b/checks/huge-usr-share
@@ -24,8 +24,8 @@ use Lintian::Tags qw(tag);
 
 # Threshold in kB of /usr/share to trigger this warning.  Consider that the
 # changelog alone can be quite big, and cannot be moved away.
-my $THRESHOLD_SIZE_SOFT = 1024;
-my $THRESHOLD_SIZE_HARD = 2048;
+my $THRESHOLD_SIZE_SOFT = 2048;
+my $THRESHOLD_SIZE_HARD = 4096;
 my $THRESHOLD_PERC = 50;
 
 sub run {
diff --git a/checks/huge-usr-share.desc b/checks/huge-usr-share.desc
index 44e3a7c..35d09ec 100644
--- a/checks/huge-usr-share.desc
+++ b/checks/huge-usr-share.desc
@@ -3,17 +3,19 @@ Author: Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
 Abbrev: hus
 Type: binary
 Unpack-Level: 2
-Info: This script checks whether an architecture-dependent package doesn't
- have a significantly big /usr/share
+Info: This script checks whether an architecture-dependent package has
+ large amounts of data in /usr/share.
 
 Tag: arch-dep-package-has-big-usr-share
 Severity: wishlist
 Certainty: certain
-Info: The package has a significant amount of architecture-independent data in
- /usr/share, while it is an architecture-dependent package.
- This is wasteful of mirror space and bandwidth, as we then end up with
+Info: The package has a significant amount of architecture-independent
+ data (over 4MB, or over 2MB and more than 50% of the package) in
+ <tt>/usr/share</tt> but is an architecture-dependent package.  This is
+ wasteful of mirror space and bandwidth since it means distributing
  multiple copies of this data, one for each architecture.
  .
- If the data in /usr/share is not architecture-independent, it is a policy
- violation, and in this case, you should move that data elsewhere.
+ If the data in <tt>/usr/share</tt> is not architecture-independent, this
+ is a Policy violation that should be fixed by moving the data elsewhere
+ (usually <tt>/usr/lib</tt>).
 Ref: devref 6.7.5
diff --git a/debian/changelog b/debian/changelog
index 16f2853..be9e038 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -57,6 +57,10 @@ lintian (2.3.0) UNRELEASED; urgency=low
   * checks/files{,.desc}:
     + [RA] New check for files present in both compressed and uncompressed
       form.  Patch from Raphael Geissert.  (Closes: #546174)
+  * checks/huge-usr-share{,.desc}:
+    + [RA] Increase the thresholds to 2MB (over 50%) and 4MB (any
+      percentage), and mention the thresholds in the tag description.
+      Thanks, Christoph Egger.  (Closes: #561720)
   * checks/init.d{,.desc}:
     + [RA] Add checks for missing dependencies on $local_fs or $remote_fs
       based on what files appear to be used in the init scripts.  Patch
diff --git a/t/COVERAGE b/t/COVERAGE
index a75d2b5..7e59289 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,4 +1,4 @@
-Last generated 2009-12-25
+Last generated 2009-12-26
 
 The following tags are not tested by the test suite:
 
@@ -374,8 +374,6 @@ files use-of-compat-symlink
 files windows-thumbnail-database-in-package
 files wrong-file-owner-uid-or-gid
 
-huge-usr-share arch-dep-package-has-big-usr-share
-
 init.d duplicate-updaterc.d-calls-in-postrm
 init.d init.d-script-has-bad-lsb-line
 init.d init.d-script-has-duplicate-lsb-section
@@ -446,8 +444,6 @@ nmu orphaned-package-should-not-have-uploaders
 nmu qa-upload-has-incorrect-version-number
 
 patch-systems dpatch-build-dep-but-no-patch-list
-patch-systems dpatch-index-references-non-existent-patch
-patch-systems dpatch-missing-description
 patch-systems patch-system-but-direct-changes-in-diff
 patch-systems quilt-build-dep-but-no-series-file
 
@@ -513,7 +509,6 @@ watch-file debian-watch-file-specifies-old-upstream-version
 Breakdown of remaining tags in legacy test suite by test case:
 
 binary
-  arch-dep-package-has-big-usr-share
   binary-has-unneeded-section
   changelog-file-not-compressed
   changelog-news-debian-mismatch
@@ -795,8 +790,6 @@ scripts
   calls-suidperl-directly
   copyright-file-lacks-pointer-to-perl-license
   debian-watch-file-specifies-old-upstream-version
-  dpatch-index-references-non-existent-patch
-  dpatch-missing-description
   duplicate-updaterc.d-calls-in-postrm
   executable-is-not-world-readable
   init.d-script-has-bad-lsb-line
diff --git a/t/tests/huge-usr-share-percent/debian/debian/rules b/t/tests/huge-usr-share-percent/debian/debian/rules
new file mode 100755
index 0000000..0199c36
--- /dev/null
+++ b/t/tests/huge-usr-share-percent/debian/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+%:
+	dh $@
+
+override_dh_install:
+	install -d debian/huge-usr-share-percent/usr/share/a
+	dd if=/dev/zero of=debian/huge-usr-share-percent/usr/share/a/zero \
+	    bs=1024k count=2
diff --git a/t/tests/huge-usr-share-percent/desc b/t/tests/huge-usr-share-percent/desc
new file mode 100644
index 0000000..1b195e3
--- /dev/null
+++ b/t/tests/huge-usr-share-percent/desc
@@ -0,0 +1,6 @@
+Testname: huge-usr-share-percent
+Sequence: 6000
+Version: 1.0
+Description: Check passing the percentage limit of /usr/share data
+Architecture: any
+Test-For: arch-dep-package-has-big-usr-share
diff --git a/t/tests/huge-usr-share-percent/tags b/t/tests/huge-usr-share-percent/tags
new file mode 100644
index 0000000..eb7c546
--- /dev/null
+++ b/t/tests/huge-usr-share-percent/tags
@@ -0,0 +1 @@
+I: huge-usr-share-percent: arch-dep-package-has-big-usr-share 2076kB 99%

-- 
Debian package checker


Reply to: