The following commit has been merged in the master branch: commit 9dbe6505f71e12b24e5125e67b6b080095d34dc6 Author: Raphael Geissert <atom...@gmail.com> Date: Sat Jun 26 19:39:27 2010 -0500
Check for invalid package names in provided (virtual) packages * checks/fields{,.desc}: + [RG] Check for invalid package names in provided (virtual) packages. diff --git a/checks/fields b/checks/fields index 6801746..c195c3d 100644 --- a/checks/fields +++ b/checks/fields @@ -553,6 +553,9 @@ if (($type eq "binary") || ($type eq 'udeb')) { tag "versioned-provides", "$part_d_orig" if ($field eq "provides" && $d_version->[0]); + tag "bad-provided-package-name", $d_pkg + if $d_pkg !~ /^[a-z0-9][-+\.a-z0-9]+$/; + tag "breaks-without-version", "$part_d_orig" if ($field eq "breaks" && !$d_version->[0] && !$VIRTUAL_PACKAGES->known($d_pkg)); diff --git a/checks/fields.desc b/checks/fields.desc index ccad53f..e87b885 100644 --- a/checks/fields.desc +++ b/checks/fields.desc @@ -33,6 +33,14 @@ Certainty: certain Info: New packages should not use uppercase characters in their names. Ref: policy 5.6.7 +Tag: bad-provided-package-name +Severity: serious +Certainty: certain +Info: A package name should be at least two characters long, must consist + of the alphanumerics (lowercase characters only) and "+" "-" and ".", and + must start with an alphanumeric character. +Ref: policy 5.6.7 + Tag: no-version-field Severity: serious Certainty: certain diff --git a/debian/changelog b/debian/changelog index 617a066..d49866d 100755 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ lintian (2.4.2) UNRELEASED; urgency=low * Summary of tag changes: + Added: + - bad-provided-package-name - copyright-refers-to-deprecated-bsd-license-file - init.d-script-depends-on-unknown-virtual-facility - xc-package-type-in-debian-control (pedantic) @@ -16,9 +17,11 @@ lintian (2.4.2) UNRELEASED; urgency=low * checks/copyright-file{,.desc}: + [RA] Deprecate references to /usr/share/common-licenses/BSD in debian/copyright following the change in Policy 3.8.5. - * checks/fields: + * checks/fields{,.desc}: + [RA] Allow Breaks without a version if the broken package is a virtual package. + + [RG] Check for invalid package names in provided (virtual) + packages. * checks/huge-usr-share{,.desc}: + [RA] Count file size from the tar listing rather than using du. The results of du vary based on file system and other factors and make diff --git a/t/tests/fields-virtual-packages/debian/debian/control.in b/t/tests/fields-virtual-packages/debian/debian/control.in index 9bb45d4..41fc040 100644 --- a/t/tests/fields-virtual-packages/debian/debian/control.in +++ b/t/tests/fields-virtual-packages/debian/debian/control.in @@ -6,10 +6,25 @@ Standards-Version: {$standards_version} Build-Depends: debhelper (>= 7.0.50~) Package: {$srcpkg} -Architecture: {$architecture} +Architecture: any Depends: $\{shlibs:Depends\}, $\{misc:Depends\}, httpd +Provides: + 123456789, + {$srcpkg}-$\{source:Version\}, + arch-specific [i386], + provides-are-allowed [!i386] 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. It may be an empty package. + +Package: {$srcpkg}2 +Architecture: {$architecture} +Depends: $\{shlibs:Depends\}, $\{misc:Depends\} +Provides: a, iNvAlId-NaMe, versioned (>> 0.1) +Description: {$description} - bogus + This is a bogus 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/fields-virtual-packages/desc b/t/tests/fields-virtual-packages/desc index 7d66aa5..84583fe 100644 --- a/t/tests/fields-virtual-packages/desc +++ b/t/tests/fields-virtual-packages/desc @@ -3,4 +3,6 @@ Sequence: 6000 Version: 1.0 Description: Tests related to virtual packages Test-For: + bad-provided-package-name + versioned-provides virtual-package-depends-without-real-package-depends diff --git a/t/tests/fields-virtual-packages/tags b/t/tests/fields-virtual-packages/tags index f2ecfc7..f295bf7 100644 --- a/t/tests/fields-virtual-packages/tags +++ b/t/tests/fields-virtual-packages/tags @@ -1 +1,4 @@ +E: fields-virtual-packages2: bad-provided-package-name a +E: fields-virtual-packages2: bad-provided-package-name iNvAlId-NaMe +E: fields-virtual-packages2: versioned-provides versioned (>> 0.1) W: fields-virtual-packages: virtual-package-depends-without-real-package-depends depends: httpd -- 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 Archive: http://lists.debian.org/e1osgav-0004wv...@alioth.debian.org