lintian: r993 - in trunk: checks debian testset testset/empty/debian
Author: he
Date: 2007-11-29 13:07:36 +0100 (Thu, 29 Nov 2007)
New Revision: 993
Modified:
trunk/checks/fields
trunk/checks/fields.desc
trunk/debian/changelog
trunk/testset/empty/debian/changelog
trunk/testset/empty/debian/control
trunk/testset/empty/debian/rules
trunk/testset/tags.empty
Log:
* checks/fields:
+ [HE] Add 'doc-package-should-be-section-doc',
'python-package-should-be-section-python',
'perl-package-should-be-section-perl'. Ideas shamelessy
stolen from linda. (Closes: #452839)
Modified: trunk/checks/fields
===================================================================
--- trunk/checks/fields 2007-11-29 11:30:20 UTC (rev 992)
+++ trunk/checks/fields 2007-11-29 12:07:36 UTC (rev 993)
@@ -312,6 +312,15 @@
} else {
tag "unknown-section", "$section" unless $known_sections{$parts[0]};
}
+
+ #Check package name <-> section
+ if ($pkg =~ m{-docs?$} && $parts[-1] ne "doc") {
+ tag "doc-package-should-be-section-doc", $pkg;
+ } elsif ($pkg =~ m{-perl$} && $parts[-1] ne "perl") {
+ tag "perl-package-should-be-section-perl", $pkg;
+ } elsif ($pkg =~ m{^py} && $parts[-1] ne "python") {
+ tag "python-package-should-be-section-python", $pkg;
+ }
}
}
Modified: trunk/checks/fields.desc
===================================================================
--- trunk/checks/fields.desc 2007-11-29 11:30:20 UTC (rev 992)
+++ trunk/checks/fields.desc 2007-11-29 12:07:36 UTC (rev 993)
@@ -668,3 +668,18 @@
If this package really does require only a particular range of Python
versions, add a Python-Version control field (as described in 2.3 of the
Python policy) to resolve this warning.
+
+Tag: doc-package-should-be-section-doc
+Type: warning
+Info: This package has a name suggesting that it contains documentation,
+ so it should be in section "doc".
+
+Tag: python-package-should-be-section-python
+Type: warning
+Info: This package has a name suggesting that it is Python-based, so it
+ should be in section "python".
+
+Tag: perl-package-should-be-section-perl
+Type: warning
+Info: This package has a name suggest that it is Perl-based, so it should
+ be in section "perl".
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-11-29 11:30:20 UTC (rev 992)
+++ trunk/debian/changelog 2007-11-29 12:07:36 UTC (rev 993)
@@ -7,6 +7,11 @@
+ [RA] Add Dm-Upload-Allowed as a recognized control field.
* checks/control-files:
+ [RA] Add symbols as a known control file for debs and udebs.
+ * checks/fields:
+ + [HE] Add 'doc-package-should-be-section-doc',
+ 'python-package-should-be-section-python',
+ 'perl-package-should-be-section-perl'. Ideas shamelessy
+ stolen from linda. (Closes: #452839)
* debian/control:
+ [TK] Add Vcs-* fields to point to Lintian's repository.
Modified: trunk/testset/empty/debian/changelog
===================================================================
--- trunk/testset/empty/debian/changelog 2007-11-29 11:30:20 UTC (rev 992)
+++ trunk/testset/empty/debian/changelog 2007-11-29 12:07:36 UTC (rev 993)
@@ -1,3 +1,9 @@
+empty (2) unstable; urgency=low
+
+ * Add pyempty, empty-docs and empty-perl (to check for section errors)
+
+ -- Marc 'HE' Brockschmidt <he@debian.org> Thu, 29 Nov 2007 12:48:13 +0100
+
empty (1) unstable; urgency=low
* Initial version
Modified: trunk/testset/empty/debian/control
===================================================================
--- trunk/testset/empty/debian/control 2007-11-29 11:30:20 UTC (rev 992)
+++ trunk/testset/empty/debian/control 2007-11-29 12:07:36 UTC (rev 993)
@@ -3,3 +3,15 @@
Package: empty
Architecture: all
+
+Package: empty-docs
+Architecture: all
+Section: perl
+
+Package: empty-perl
+Architecture: all
+Section: doc
+
+Package: pyempty
+Architecture: all
+Section: doc
Modified: trunk/testset/empty/debian/rules
===================================================================
--- trunk/testset/empty/debian/rules 2007-11-29 11:30:20 UTC (rev 992)
+++ trunk/testset/empty/debian/rules 2007-11-29 12:07:36 UTC (rev 993)
@@ -21,12 +21,22 @@
build:
binary-indep:
- install -d debian/tmp/DEBIAN
- dpkg-gencontrol
- dpkg --build debian/tmp ..
+ install -d debian/empty debian/empty/DEBIAN
+ dpkg-gencontrol -pempty -Pdebian/empty
+ dpkg --build debian/empty ..
+ install -d debian/empty-docs debian/empty-docs/DEBIAN
+ dpkg-gencontrol -pempty-docs -Pdebian/empty-docs
+ dpkg --build debian/empty-docs ..
+ install -d debian/empty-perl debian/empty-perl/DEBIAN
+ dpkg-gencontrol -pempty-perl -Pdebian/empty-perl
+ dpkg --build debian/empty-perl ..
+ install -d debian/pyempty debian/pyempty/DEBIAN
+ dpkg-gencontrol -ppyempty -Pdebian/pyempty
+ dpkg --build debian/pyempty ..
binary: binary-indep
clean:
+ rm -rf $(CURDIR)/debian/empty $(CURDIR)/debian/empty-docs $(CURDIR)/debian/empty-perl $(CURDIR)/debian/pyempty debian/files
.PHONY: build binary-indep binary clean
Modified: trunk/testset/tags.empty
===================================================================
--- trunk/testset/tags.empty 2007-11-29 11:30:20 UTC (rev 992)
+++ trunk/testset/tags.empty 2007-11-29 12:07:36 UTC (rev 993)
@@ -1,14 +1,32 @@
E: empty source: debian-rules-missing-required-target binary-arch
E: empty source: maintainer-address-missing empty
E: empty source: no-standards-version-field
+E: empty-docs: maintainer-address-missing empty
+E: empty-docs: no-copyright-file
+E: empty-docs: package-has-no-description
+E: empty-perl: maintainer-address-missing empty
+E: empty-perl: no-copyright-file
+E: empty-perl: package-has-no-description
E: empty: maintainer-address-missing empty
E: empty: no-copyright-file
E: empty: package-has-no-description
-E: empty_1_i386.changes: no-description-in-changes-file
+E: empty_2_i386.changes: no-description-in-changes-file
+E: pyempty: maintainer-address-missing empty
+E: pyempty: no-copyright-file
+E: pyempty: package-has-no-description
I: empty source: no-section-field-for-source
W: empty source: changelog-should-mention-nmu
W: empty source: maintainer-not-full-name empty
-W: empty source: source-nmu-has-incorrect-version-number 1
+W: empty source: source-nmu-has-incorrect-version-number 2
+W: empty-docs: doc-package-should-be-section-doc empty-docs
+W: empty-docs: maintainer-not-full-name empty
+W: empty-docs: no-priority-field
+W: empty-perl: maintainer-not-full-name empty
+W: empty-perl: no-priority-field
+W: empty-perl: perl-package-should-be-section-perl empty-perl
W: empty: maintainer-not-full-name empty
W: empty: no-priority-field
W: empty: no-section-field
+W: pyempty: maintainer-not-full-name empty
+W: pyempty: no-priority-field
+W: pyempty: python-package-should-be-section-python pyempty
Reply to: