Bug#608810: lintian: check for compressed objects.inv file in sphinx-built documentation
Package: lintian
Version: 2.4.3
Severity: wishlist
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Building documentation for python packages is often done through sphinx
which generates an inventory file named objects.inv alongside the
documentation.
This file can grow over 4k in size and will then get compressed by
dh_compress if not explicitly excluded. If the file is compressed it is
no longer readable for documenation tools like sphinx.ext.intersphinx.
The attached patch proposes a check on the presence of a objects.inv.gz
file in the package documentation.
- -- System Information:
Debian Release: 6.0
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.36-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages lintian depends on:
ii binutils 2.21-3 The GNU assembler, linker and bina
ii diffstat 1.54-1 produces graph of changes introduc
ii dpkg-dev 1.15.8.7 Debian package development tools
ii file 5.04-6 Determines file type using "magic"
ii gettext 0.18.1.1-3 GNU Internationalization utilities
ii intltool-debian 0.35.0+20060710.1 Help i18n of RFC822 compliant conf
ii libapt-pkg-perl 0.1.24+b1 Perl interface to libapt-pkg
ii libclass-accessor-perl 0.34-1 Perl module that automatically gen
ii libdigest-sha-perl 5.50-1 Perl extension for SHA-1/224/256/3
ii libipc-run-perl 0.89-1 Perl module for running processes
ii libparse-debianchangel 1.1.1-2.1 parse Debian changelogs and output
ii libtimedate-perl 1.2000-1 collection of modules to manipulat
ii liburi-perl 1.56-1 module to manipulate and access UR
ii locales 2.11.2-7 Embedded GNU C Library: National L
ii locales-all [locales] 2.11.2-7 Embedded GNU C Library: Precompile
ii man-db 2.5.7-7 on-line manual pager
ii perl [libdigest-sha-pe 5.10.1-16 Larry Wall's Practical Extraction
lintian recommends no packages.
Versions of packages lintian suggests:
pn binutils-multiarch <none> (no description available)
ii libtext-template-perl 1.45-1 Text::Template perl module
ii man-db 2.5.7-7 on-line manual pager
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAk0iBDcACgkQeJ3z1zFMUGbT0QCeLc6GYt9sH5n6qA90EPSkkufK
cuMAn2lfQ0rT/8LoBZVEPdSbx9yYolTN
=o+Hr
-----END PGP SIGNATURE-----
--- /usr/share/lintian/checks/files 2010-07-26 06:50:52.000000000 +0200
+++ files 2011-01-03 17:42:29.531200394 +0100
@@ -411,6 +411,13 @@
windows)(?:\.txt)?(?:\.gz)?$,xi){
tag "package-contains-readme-for-other-platform-or-distro", "$file";
}
+
+ # contains a compressed version of objects.inv in sphinx-generated documentation?
+ if ($file =~ m,^usr/share/doc/$tmp/html/objects\.inv\.gz$,
+ and $info->file_info->{$file} =~ m/gzip compressed/) {
+ tag "compressed-objects.inv", "$file";
+ }
+
}
}
# ---------------- /usr/doc
--- /usr/share/lintian/checks/files.desc 2010-07-26 06:50:52.000000000 +0200
+++ files.desc 2011-01-03 16:51:48.765010493 +0100
@@ -1180,3 +1180,11 @@
.
It is possible that the language code was mistyped or incorrectly
guessed from the language's or country's name.
+
+Tag: compressed-objects.inv
+Severity: normal
+Certainty: possible
+Info: The package appears to ship a gzip compressed objects.inv file
+ in it's documentation. This is usually the result of dh_compress.
+ .
+ This file should be excluded from compression during build time.
Reply to: