The following commit has been merged in the master branch: commit f9a8691369ddbacb8054a9d312f16eb1bdd87b03 Author: Russ Allbery <r...@debian.org> Date: Fri Dec 26 11:55:09 2008 -0800
Check for too-short extended descriptions * checks/description{,.desc}: + [RA] Check for extended descriptions shorter than three lines; they probably don't contain enough information. Patch from Raphael Geissert. diff --git a/checks/description b/checks/description index 025917b..fdabcaa 100644 --- a/checks/description +++ b/checks/description @@ -121,7 +121,7 @@ foreach (split /\n/, $description) { my $wo_quotes = $_; $wo_quotes =~ s,(\"|\')(.*?)(\1),,; - while ($wo_quotes =~ m,(?:\W|^)((\w+)(\s+(\2))+)(?:\W|$),i) { + while ($wo_quotes =~ m,(?:\W|^)((\w+)(\s+(\2))+)(?:\W|\z),i) { my $words = $1; $wo_quotes =~ s/\Q$words//; tag "description-contains-duplicated-word", "$words"; @@ -144,8 +144,12 @@ foreach (split /\n/, $description) { } } -if ($lines == 0) { - tag "extended-description-is-empty", "" unless $type eq 'udeb'; +if ($type ne 'udeb') { + if ($lines == 0) { + tag "extended-description-is-empty"; + } elsif ($lines <= 2) { + tag "extended-description-is-probably-too-short"; + } } if ($description) { diff --git a/checks/description.desc b/checks/description.desc index c53b0fb..08ef1c1 100644 --- a/checks/description.desc +++ b/checks/description.desc @@ -22,6 +22,17 @@ Status: untested Info: The extended description (the lines after the first line of the "Description:" field) is empty. +Tag: extended-description-is-probably-too-short +Severity: minor +Certainty: possible +Ref: devref 6.2.1, devref 6.2.3 +Info: The extended description (the lines after the first line of the + "Description:" field) is only one or two lines long. The extended + description should provide a user with enough information to decide + whether they want to install this package, what it contains, and how it + compares to similar packages. One or two lines is normally not enough to + do this. + Tag: description-contains-invalid-control-statement Severity: serious Certainty: certain diff --git a/debian/changelog b/debian/changelog index aae6738..969cd36 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,12 @@ lintian (2.1.3) UNRELEASED; urgency=low - debian-watch-file-should-use-sf-redirector - debian-watch-file-specifies-wrong-upstream-version - debian-watch-file-specifies-old-upstream-version + - extended-description-is-probably-too-short + * checks/description{,.desc}: + + [RA] Check for extended descriptions shorter than three lines; they + probably don't contain enough information. Patch from Raphael + Geissert. * checks/watch-file{,.desc}: + [RA] Merge a set of changes by Raphael Geissert: - Correctly parse multiple line continuations. diff --git a/t/templates/skel/debian/control.in b/t/templates/skel/debian/control.in index bc8f6c0..36ee720 100644 --- a/t/templates/skel/debian/control.in +++ b/t/templates/skel/debian/control.in @@ -9,5 +9,6 @@ Package: {$srcpkg} Architecture: {$architecture} Depends: $\{shlib:Depends\}, $\{misc:Depends\} Description: {$description} - . - Part of the lintian test suite. + 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/patch-systems-quilt-description/debian/debian/control.in b/t/tests/patch-systems-quilt-description/debian/debian/control.in index 28af7ad..c3197f0 100644 --- a/t/tests/patch-systems-quilt-description/debian/debian/control.in +++ b/t/tests/patch-systems-quilt-description/debian/debian/control.in @@ -9,6 +9,6 @@ Package: {$srcpkg} Architecture: {$architecture} Depends: $\{shlib:Depends\}, $\{misc:Depends\} Description: {$description} - . - Part of the lintian test suite. - + 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/scripts-ocamlrun/debian/debian/control.in b/t/tests/scripts-ocamlrun/debian/debian/control.in index d40a17a..27e7f41 100644 --- a/t/tests/scripts-ocamlrun/debian/debian/control.in +++ b/t/tests/scripts-ocamlrun/debian/debian/control.in @@ -9,5 +9,6 @@ Package: {$srcpkg} Architecture: {$architecture} Depends: ocaml-nox-3.10.2, $\{shlib:Depends\}, $\{misc:Depends\} Description: {$description} - . - Part of the lintian test suite. + 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/testset/cdbs-test/debian/control b/testset/cdbs-test/debian/control index 7bf7b8c..1c02e64 100644 --- a/testset/cdbs-test/debian/control +++ b/testset/cdbs-test/debian/control @@ -11,3 +11,7 @@ Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends} Description: Checks related to the cdbs build-system bla bla bla + . + 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/testset/copyright/debian/control b/testset/copyright/debian/control index 639f49a..2fb5ee2 100644 --- a/testset/copyright/debian/control +++ b/testset/copyright/debian/control @@ -9,55 +9,79 @@ Standards-Version: 3.8.0 Package: copyright.iso-8859-1 Architecture: all Description: checks for non-utf-8-encodings - This is just a sentence. + 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. Package: copyright.full-gpl Architecture: all Description: checks inclusion of GPL in full text - This is just a sentence. + 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. Package: copyright.full-gfdl Architecture: all Description: checks inclusion of GFDL in full text - This is just a sentence. + 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. Package: copyright.full-apache-2 Architecture: all Description: checks inclusion of Apache 2.0 in full text - This is just a sentence. + 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. Package: copyright.misc-errors Architecture: all Description: checks various errors in copyright files - This is just a sentence. + 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. Package: copyright.no-errors Architecture: all Description: this should not emit any error - This is just a sentence. + 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. Package: copyright.symlink Architecture: all Description: just use a symlink for the copyright file - This is just a sentence. + 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. Package: copyright.compressed Architecture: all Description: include a valid copyright file and compress it - This is just a sentence. + 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. Package: copyright.old-style Architecture: all Description: use an old-style directory structure - This is just a sentence. + 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. Package: copyright.full-gpl-1 Architecture: all Description: checks inclusion of GPL1 This should not trigger any errors as the common license files only cover GPL >= 2 + . + 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. Package: copyright.w3c Architecture: all Description: the w3c license claims to be "gpl compatible" - This is just a sentence. + 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/testset/debconf/debian/control b/testset/debconf/debian/control index a45801f..fcf8181 100644 --- a/testset/debconf/debian/control +++ b/testset/debconf/debian/control @@ -14,19 +14,31 @@ Package: debconf-test-noscripts Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Test package for the debconf checks of lintian - Package missing postinst/postrm/config + Package missing postinst/postrm/config. + . + 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. Package: debconf-test-preinst Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Test package for the debconf checks of lintian - Package uses debconf only in preinst + Package uses debconf only in preinst. + . + 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. Package: debconf-test-postinst Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Test package for the debconf checks of lintian - Package uses debconf only in postinst + Package uses debconf only in postinst. + . + 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. Package: debconf-udeb Section: debian-installer diff --git a/testset/debug/debian/control b/testset/debug/debian/control index b80e8db..d92fbcd 100644 --- a/testset/debug/debian/control +++ b/testset/debug/debian/control @@ -11,6 +11,10 @@ Architecture: alpha amd64 arm hppa hurd-i386 i386 ia64 kfreebsd-i386 m68k mips m Depends: ${shlibs:Depends}, ${misc:Depends} Description: Test for external debugging information lintian regression test for external debugging file handling. + . + 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. Package: hello-dbg Priority: extra @@ -18,6 +22,10 @@ Architecture: alpha amd64 arm hppa hurd-i386 i386 ia64 kfreebsd-i386 m68k mips m Depends: hello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: Test for external debugging information lintian regression test for external debugging file handling. + . + 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. Package: libhello0 Section: libs @@ -25,6 +33,10 @@ Architecture: alpha amd64 arm hppa hurd-i386 i386 ia64 kfreebsd-i386 m68k mips m Depends: ${shlibs:Depends}, ${misc:Depends} Description: Test for external debugging information lintian regression test for external debugging file handling. + . + 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. Package: libhello0-dbg Section: libdevel @@ -33,3 +45,7 @@ Architecture: alpha amd64 arm hppa hurd-i386 i386 ia64 kfreebsd-i386 m68k mips m Depends: libhello (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: Test for external debugging information lintian regression test for external debugging file handling. + . + 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/testset/dh7-minimal/debian/control b/testset/dh7-minimal/debian/control index a5b0e92..0083073 100644 --- a/testset/dh7-minimal/debian/control +++ b/testset/dh7-minimal/debian/control @@ -10,3 +10,7 @@ Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends} Description: Checks related to debhelper rule minimization New in debhelper 7. + . + 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/testset/dh7-test/debian/control b/testset/dh7-test/debian/control index 49827ac..1bc46a7 100644 --- a/testset/dh7-test/debian/control +++ b/testset/dh7-test/debian/control @@ -10,3 +10,7 @@ Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends} Description: Checks related to the dh build utility New in debhelper 7. + . + 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/testset/diffs/debian/control b/testset/diffs/debian/control index 756fb62..3ea2504 100644 --- a/testset/diffs/debian/control +++ b/testset/diffs/debian/control @@ -9,4 +9,6 @@ Package: diffs Architecture: all Depends: test Description: test lintian's diff file checks - Regression test lintian's diff file checks. + 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/testset/etcfiles/debian/control b/testset/etcfiles/debian/control index 878a7cf..9c4d743 100644 --- a/testset/etcfiles/debian/control +++ b/testset/etcfiles/debian/control @@ -9,6 +9,10 @@ Architecture: any Depends: ${shlibs:Depends} Description: test handling of files in /etc Regression test for lintian's handling of files in /etc. + . + 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. Package: only-etcfiles Architecture: all diff --git a/testset/fields/debian/control b/testset/fields/debian/control index 6198251..9720ea8 100644 --- a/testset/fields/debian/control +++ b/testset/fields/debian/control @@ -9,7 +9,9 @@ Essential: no Architecture: all Depends: python-minimal Description: Generate some errors - Field testing is fun! + 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. Package: another-version Essential: yes @@ -18,3 +20,7 @@ Architecture: all Description: Also generate some errors This package gets another version number and tries to sneak in a new essential package. + . + 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/testset/filenames/debian/control b/testset/filenames/debian/control index c8a72e0..96c9565 100644 --- a/testset/filenames/debian/control +++ b/testset/filenames/debian/control @@ -24,6 +24,10 @@ Section: games Description: Test game filename/location checks This package contains files with slightly less evil names than filenames. + . + 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. Package: more-filename-games Architecture: all @@ -32,3 +36,7 @@ Section: games Priority: optional Description: More test for game filename/location checks This package contains no evil names, only evil locations. + . + 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/testset/foo++/debian/control b/testset/foo++/debian/control index 2ed1c43..cbef333 100644 --- a/testset/foo++/debian/control +++ b/testset/foo++/debian/control @@ -24,3 +24,7 @@ Depends: test, foo++ Description: see how lintian reacts to plus signs in the package name Regression test to see if lintian tests work on a package with plus signs in its name. This has /usr/share/doc links to foo++ to trigger even more checks. + . + 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/testset/libbaz/debian/control b/testset/libbaz/debian/control index 8330ac8..952f3a2 100644 --- a/testset/libbaz/debian/control +++ b/testset/libbaz/debian/control @@ -9,35 +9,59 @@ Package: libbaz1 Architecture: any Provides: libbaz Description: test handling of library packages - Regression test for lintian's handling of libraries + Regression test for lintian's handling of libraries. + . + 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. Package: libbaz1-dev Architecture: any Depends: libbaz1 (= ${source:Version}), perlapi-5.8.8 Description: development package - Regression test for lintian's handling of libraries + Regression test for lintian's handling of libraries. + . + 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. Package: libbaz2 Architecture: any Depends: ${shlibs:Depends}, libssl0.9.8 Description: test handling of library packages - Regression test for lintian's handling of libraries + Regression test for lintian's handling of libraries. + . + 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. Package: libbaz2-dev Architecture: any Depends: ${shlibs:Depends}, libbaz2 (= ${Source-Version}) Description: development package - Regression test for lintian's handling of libraries + Regression test for lintian's handling of libraries. + . + 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. Package: libbaz2-dbg Architecture: any Depends: libbaz2 (= ${binary:Version}) Priority: optional Description: debugging package - Regression test for lintian's handling of libraries + Regression test for lintian's handling of libraries. + . + 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. Package: ia32-libbaz2 Architecture: all Depends: ${shlibs:Depends} Description: multiarch package - Regression test for lintian's handling of libraries + Regression test for lintian's handling of libraries. + . + 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/testset/maintainer-scripts/debian/control b/testset/maintainer-scripts/debian/control index f5aabc5..28c203f 100644 --- a/testset/maintainer-scripts/debian/control +++ b/testset/maintainer-scripts/debian/control @@ -11,4 +11,6 @@ Package: maintainer-scripts Architecture: all Depends: test Description: test lintian's maintainer script checks - Regression test lintian's maintainer script checks. + 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/testset/manpages/debian/control b/testset/manpages/debian/control index a5f871b..22592e6 100644 --- a/testset/manpages/debian/control +++ b/testset/manpages/debian/control @@ -8,4 +8,6 @@ Package: manpages Architecture: all Depends: test Description: test lintian's manual page checks - Regression test lintian's manual page checks. + 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/testset/non-us/debian/control b/testset/non-us/debian/control index 4dbeeb3..a29734d 100644 --- a/testset/non-us/debian/control +++ b/testset/non-us/debian/control @@ -9,23 +9,31 @@ Package: patented-app Architecture: all Section: non-us Description: test for non-us checks - regession test to stress non-us checks + 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. Package: crypto-app Architecture: all Section: non-US Description: proper non-US app - This is a proper non-us package + 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. Package: broken-crypto Architecture: all Section: non-US/admin Description: broken non-US app - This package declares an invalid section + 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. Package: nonfree-crypto-app Architecture: all Section: non-US/non-free Description: proper non-US/non-free app - This is a proper non-us package + 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/testset/scripts/debian/control b/testset/scripts/debian/control index 3a290fa..07e2ea2 100644 --- a/testset/scripts/debian/control +++ b/testset/scripts/debian/control @@ -11,4 +11,6 @@ Architecture: all Depends: test, ruby1.8, build-essential, libssl0.9.7 Recommends: tk8.4 | wish Description: test lintian's script file checks - Regression test lintian's script file checks. + 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/testset/tags.description b/testset/tags.description index 46fed18..f712cd1 100644 --- a/testset/tags.description +++ b/testset/tags.description @@ -13,8 +13,10 @@ E: description: description-is-debmake-template E: description: description-starts-with-package-name E: description: no-copyright-file I: description-bar: no-md5sums-control-file +I: description-baz: extended-description-is-probably-too-short I: description-baz: no-md5sums-control-file I: description-foo: no-md5sums-control-file +I: description-qux: extended-description-is-probably-too-short I: description-qux: no-md5sums-control-file I: description: no-md5sums-control-file W: description source: maintainer-also-in-uploaders diff --git a/testset/tags.dh-test b/testset/tags.dh-test index b4df256..9398521 100644 --- a/testset/tags.dh-test +++ b/testset/tags.dh-test @@ -3,6 +3,7 @@ E: dh-test source: missing-build-dependency-for-dh_-command dh_lisp=dh-lisp E: dh-test: description-is-dh_make-template E: dh-test: helper-templates-in-copyright E: dh-test: section-is-dh_make-template +I: dh-test: extended-description-is-probably-too-short W: dh-test source: ancient-standards-version 3.6.2 (current is 3.8.0) W: dh-test source: debhelper-but-no-misc-depends dh-test W: dh-test source: debian-rules-ignores-make-clean-error line 48 -- Debian package checker -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org