The $is_empty variable can't be used to distinguish transitional packages. Instead add a $is_dummy variable for tracking the result from analyzing the description for dummy/transitional/meta package keywords.
Fix the files-arch-indep-not-marked-all test to use a package that is neither transitional nor empty. --- checks/files | 9 +++++---- .../debian/debian/control.in | 14 ++++++++++++++ .../debian/debian/install | 1 + .../debian/some-file | 1 + 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/checks/files b/checks/files index 97c70a8..432599e 100644 --- a/checks/files +++ b/checks/files @@ -213,17 +213,18 @@ my @devhelp_links; my %x11_font_dirs; # Check if package is empty -my $is_empty = 1; +my $is_dummy = 0; my $description = $info->field('description'); if ($description) { for my $regex (@METAPKG_REGEX) { if ($description =~ /$regex/) { - $is_empty = 0; + $is_dummy = 1; last; } } } -if ($is_empty) { +if (!$is_dummy) { + my $is_empty = 1; for my $file (@{$info->sorted_index}) { # Ignore directories unless ($file =~ m,/$,) { @@ -1334,7 +1335,7 @@ foreach my $file (@{$info->sorted_index}) { } } -if (!$is_empty && !$arch_dep_files && ($info->field('architecture')//'') ne 'all') { +if (!$is_dummy && !$arch_dep_files && ($info->field('architecture')//'') ne 'all') { tag 'package-contains-no-arch-dependent-files' unless $type eq 'udeb'; } diff --git a/t/tests/files-arch-indep-not-marked-all/debian/debian/control.in b/t/tests/files-arch-indep-not-marked-all/debian/debian/control.in new file mode 100644 index 0000000..fc7a0e1 --- /dev/null +++ b/t/tests/files-arch-indep-not-marked-all/debian/debian/control.in @@ -0,0 +1,14 @@ +Source: {$srcpkg} +Priority: extra +Section: {$section} +Maintainer: {$author} +Standards-Version: {$standards_version} +Build-Depends: debhelper (>= 7.0.50~) + +Package: {$srcpkg} +Architecture: {$architecture} +Depends: $\{shlibs:Depends\}, $\{misc:Depends\} +Description: {$description} + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/tests/files-arch-indep-not-marked-all/debian/debian/install b/t/tests/files-arch-indep-not-marked-all/debian/debian/install new file mode 100644 index 0000000..6c37889 --- /dev/null +++ b/t/tests/files-arch-indep-not-marked-all/debian/debian/install @@ -0,0 +1 @@ +some-file usr/share/lintian diff --git a/t/tests/files-arch-indep-not-marked-all/debian/some-file b/t/tests/files-arch-indep-not-marked-all/debian/some-file new file mode 100644 index 0000000..02c9d2d --- /dev/null +++ b/t/tests/files-arch-indep-not-marked-all/debian/some-file @@ -0,0 +1 @@ +Hi, I could totally be architecture dependent. -- tg: (5976631..) t/is-dummy (depends on: master) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org