tags 595941 + patch thanks Made a patch for it and included a small test case for the tag.
~Niels
From 577a7ca9453a24f7fdba2eb5ba19a93c9839e3a1 Mon Sep 17 00:00:00 2001 From: Niels Thykier <ni...@thykier.net> Date: Thu, 9 Dec 2010 16:21:28 +0100 Subject: [PATCH] Fix false-positive with extra-license-file with license.ui with test case. --- checks/files | 2 +- .../files-extra-license/debian/debian/control.in | 18 ++++++++++++++++++ t/tests/files-extra-license/debian/debian/docs | 1 + t/tests/files-extra-license/debian/debian/rules | 3 +++ t/tests/files-extra-license/debian/license.txt | 1 + t/tests/files-extra-license/debian/license.ui | 2 ++ t/tests/files-extra-license/desc | 6 ++++++ t/tests/files-extra-license/tags | 1 + 8 files changed, 33 insertions(+), 1 deletions(-) create mode 100644 t/tests/files-extra-license/debian/debian/control.in create mode 100644 t/tests/files-extra-license/debian/debian/docs create mode 100755 t/tests/files-extra-license/debian/debian/rules create mode 100644 t/tests/files-extra-license/debian/license.txt create mode 100644 t/tests/files-extra-license/debian/license.ui create mode 100644 t/tests/files-extra-license/desc create mode 100644 t/tests/files-extra-license/tags diff --git a/checks/files b/checks/files index 56cf40b..bdbd585 100644 --- a/checks/files +++ b/checks/files @@ -757,7 +757,7 @@ foreach my $file (sort keys %{$info->index}) { # # Ignore extra license files in examples, since various package # building software includes example packages with licenses. - and not $file =~ m/\.(?:el|c|h|py|cc|pl|pm|hi|p_hi|html|php|rb|xpm|png|jpe?g|gif|svg|dtd)$/ + and not $file =~ m/\.(?:el|c|h|py|cc|pl|pm|hi|p_hi|html|php|rb|xpm|png|jpe?g|gif|svg|dtd|ui)$/ and not $file =~ m,^usr/share/zope/Products/.*\.(?:dtml|pt|cpt)$, and not $file =~ m,/under\S+License\.docbook$, and not $file =~ m,^(?:usr/)?s?bin/, diff --git a/t/tests/files-extra-license/debian/debian/control.in b/t/tests/files-extra-license/debian/debian/control.in new file mode 100644 index 0000000..a4517e1 --- /dev/null +++ b/t/tests/files-extra-license/debian/debian/control.in @@ -0,0 +1,18 @@ +Source: {$srcpkg} +Priority: extra +Section: {$section} +Maintainer: {$author} +Standards-Version: {$standards_version} +Build-Depends: debhelper (>= 7) + +Package: {$srcpkg} +Architecture: all +Depends: $\{shlibs:Depends\}, $\{misc:Depends\} +Description: checks for extra license files + Tests extra license files. + . + 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. It may + be an empty package. + diff --git a/t/tests/files-extra-license/debian/debian/docs b/t/tests/files-extra-license/debian/debian/docs new file mode 100644 index 0000000..9c789d9 --- /dev/null +++ b/t/tests/files-extra-license/debian/debian/docs @@ -0,0 +1 @@ +license* diff --git a/t/tests/files-extra-license/debian/debian/rules b/t/tests/files-extra-license/debian/debian/rules new file mode 100755 index 0000000..cbe925d --- /dev/null +++ b/t/tests/files-extra-license/debian/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ diff --git a/t/tests/files-extra-license/debian/license.txt b/t/tests/files-extra-license/debian/license.txt new file mode 100644 index 0000000..473e105 --- /dev/null +++ b/t/tests/files-extra-license/debian/license.txt @@ -0,0 +1 @@ +Lintian should pick up this as an extra license file. diff --git a/t/tests/files-extra-license/debian/license.ui b/t/tests/files-extra-license/debian/license.ui new file mode 100644 index 0000000..afae290 --- /dev/null +++ b/t/tests/files-extra-license/debian/license.ui @@ -0,0 +1,2 @@ +Lintian should not mistake this QT UI file for a license file. + diff --git a/t/tests/files-extra-license/desc b/t/tests/files-extra-license/desc new file mode 100644 index 0000000..1f7db60 --- /dev/null +++ b/t/tests/files-extra-license/desc @@ -0,0 +1,6 @@ +Testname: files-extra-license +Sequence: 6000 +Version: 1.0 +Description: Test for extra license files +Test-For: + extra-license-file diff --git a/t/tests/files-extra-license/tags b/t/tests/files-extra-license/tags new file mode 100644 index 0000000..2dbaffc --- /dev/null +++ b/t/tests/files-extra-license/tags @@ -0,0 +1 @@ +W: files-extra-license: extra-license-file usr/share/doc/files-extra-license/license.txt -- 1.7.2.3