Package: lintian Version: 2.2.12 Severity: wishlist Tags: patch Hi,
while looking at some python packge on debian mentors, I noticed that lintian does not cry loadly when a package is Arch:any (or Arch:something but not all) but does not contain anything really arch-specific (only /u/s/doc and some ..py file). Attached is a minimalistic patch to does what I mean. Regards Evgeni -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.30-1-686 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages lintian depends on: ii binutils 2.19.1-1 The GNU assembler, linker and bina ii diffstat 1.47-1 produces graph of changes introduc ii dpkg-dev 1.15.2 Debian package development tools ii file 5.03-1 Determines file type using "magic" ii gettext 0.17-6 GNU Internationalization utilities ii intltool-debian 0.35.0+20060710.1 Help i18n of RFC822 compliant conf ii libapt-pkg-perl 0.1.23 Perl interface to libapt-pkg ii libipc-run-perl 0.82-1 Perl module for running processes ii libparse-debianchangel 1.1.1-2 parse Debian changelogs and output ii libtimedate-perl 1.1600-9 Time and date functions for Perl ii liburi-perl 1.37+dfsg-1 Manipulates and accesses URI strin ii man-db 2.5.5-2 on-line manual pager ii perl [libdigest-sha-pe 5.10.0-23 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.5-2 on-line manual pager -- no debconf information
>From 0b9cdf9418031157670e0ff65028f90f33560df4 Mon Sep 17 00:00:00 2001 From: Evgeni Golov <evg...@debian.org> Date: Thu, 25 Jun 2009 01:57:10 +0200 Subject: [PATCH] Architecture dependent packages should contain arch-dependent content A package that is not arch:all should contain at least one file that is architecture dependent, or that package can be arch:all and save a lot of mirror-space. That easily happens with python modules that contain .py files only. --- checks/binaries | 9 +++++++++ checks/binaries.desc | 9 +++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/checks/binaries b/checks/binaries index 83fb858..20fac8e 100644 --- a/checks/binaries +++ b/checks/binaries @@ -81,6 +81,7 @@ my $needs_libc_file; my $needs_libc_count = 0; my $needs_depends_line = 0; my $has_perl_lib = 0; +my $has_no_binary = 1; my %SONAME; @@ -199,6 +200,10 @@ foreach my $file (sort keys %{$info->file_info}) { } } + # We found some kind of binary, don't warn about Architecture: any package + # containing no binaries or objects. + $has_no_binary = 0; + # ELF? next unless $fileinfo =~ m/^[^,]*\bELF\b/o; @@ -336,6 +341,10 @@ foreach my $file (sort keys %{$info->file_info}) { } } +if ($arch ne 'all' && $has_no_binary) { + tag "arch-dependent-package-contains-no-binary-or-object"; +} + # Find the package dependencies, which is used by various checks. my $depends = ''; if (defined $info->field('pre-depends')) { diff --git a/checks/binaries.desc b/checks/binaries.desc index 3cd3569..23f0e99 100644 --- a/checks/binaries.desc +++ b/checks/binaries.desc @@ -16,6 +16,15 @@ Info: The package contains a binary or object file but is tagged binary blobs for other purposes independent of the host architecture (such as BIOS updates or firmware), please add a Lintian override. +Tag: arch-dependent-package-contains-no-binary-or-object +Severity: important +Certainty: certain +Info: The package contains neither binaries nor objects but is tagged + Architecture: any. + . + Packages that do not include any architecture-specific files should be + Architecture: all. + Tag: unstripped-binary-or-object Severity: important Certainty: certain -- 1.6.3.1