lintian: r1076 - in trunk: checks debian testset testset/binary/debian testset/relations/debian
Author: djpig
Date: 2007-12-09 18:15:52 +0100 (Sun, 09 Dec 2007)
New Revision: 1076
Modified:
trunk/checks/fields
trunk/checks/fields.desc
trunk/debian/changelog
trunk/debian/control
trunk/testset/binary/debian/control
trunk/testset/relations/debian/control
trunk/testset/tags.binary
trunk/testset/tags.relations
Log:
Implement some homepage checks
Modified: trunk/checks/fields
===================================================================
--- trunk/checks/fields 2007-12-09 04:41:17 UTC (rev 1075)
+++ trunk/checks/fields 2007-12-09 17:15:52 UTC (rev 1076)
@@ -354,6 +354,26 @@
#---- Description
# handled in checks/description
+#--- Homepage
+
+if (open (FH, '<', "fields/homepage")) {
+ my $homepage = <FH>;
+ close(FH);
+
+ unfold("homepage", \$homepage);
+
+ if ($homepage =~ /^\s*<(?:UR[LI]:)?.*>\s*$/i) {
+ tag "superfluous-clutter-in-homepage", $homepage;
+ }
+
+ require URI;
+ my $uri = URI->new($homepage);
+
+ unless ($uri->scheme) { # not an absolute URI
+ tag "bad-homepage", $homepage;
+ }
+}
+
#---- Installer-Menu-Item (udeb)
if (open(FH, '<', "fields/installer-menu-item")) {
Modified: trunk/checks/fields.desc
===================================================================
--- trunk/checks/fields.desc 2007-12-09 04:41:17 UTC (rev 1075)
+++ trunk/checks/fields.desc 2007-12-09 17:15:52 UTC (rev 1076)
@@ -277,6 +277,18 @@
the priorities defined in the Policy Manual.
Ref: policy 2.5
+Tag: superfluous-clutter-in-homepage
+Type: warning
+Info: The `Homepage:' field in this package's control file contains
+ superfluous markup around the URL, like enclosing < and >.
+ This is unnecessary and needlessly complicates using this information.
+
+Tag: bad-homepage
+Type: warning
+Info: The `Homepage:' field in this package's control file does not
+ contain a valid absolute URL. Most probably you forgot to specificy
+ the scheme (e.g. http).
+
Tag: obsolete-field
Type: error
Info: This field is listed in the Policy Manual as obsolete and
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-12-09 04:41:17 UTC (rev 1075)
+++ trunk/debian/changelog 2007-12-09 17:15:52 UTC (rev 1076)
@@ -3,6 +3,10 @@
The "it would be lovely if there were an actual desktop file standard"
release.
+ * checks/field{.desc,}:
+ + [FL] Add some checks for the Homepage field:
+ - warn about enclosing < and >
+ - warn about non-absolute URLs
* checks/menu-format{.desc,}:
+ [RA] Add Actions to the KDE-specific desktop file keys. Add
Application as an acceptable Main Category even though it's not
@@ -13,6 +17,9 @@
+ [RA] Warn about desktop files containing CRLF line endings (and then
strip the CR for later checks). The standard is explicit that each
line ends in only LF.
+
+ * debian/control:
+ + [FL] Add liburi-perl to Depends for the Homepage checks.
-- Russ Allbery <rra@debian.org> Sat, 08 Dec 2007 20:35:56 -0800
Modified: trunk/debian/control
===================================================================
--- trunk/debian/control 2007-12-09 04:41:17 UTC (rev 1075)
+++ trunk/debian/control 2007-12-09 17:15:52 UTC (rev 1076)
@@ -11,7 +11,7 @@
Package: lintian
Architecture: all
-Depends: perl, libdigest-md5-perl | perl (>> 5.8), dpkg-dev (>= 1.13.17), file, binutils, diffstat (>= 1.27-1), man-db (>= 2.3.20-1), gettext (>= 0.16), intltool-debian, libparse-debianchangelog-perl (>= 0.6)
+Depends: perl, libdigest-md5-perl | perl (>> 5.8), dpkg-dev (>= 1.13.17), file, binutils, diffstat (>= 1.27-1), man-db (>= 2.3.20-1), gettext (>= 0.16), intltool-debian, libparse-debianchangelog-perl (>= 0.6), liburi-perl
Suggests: binutils-multiarch
Description: Debian package checker
Lintian dissects Debian packages and reports bugs and policy
Modified: trunk/testset/binary/debian/control
===================================================================
--- trunk/testset/binary/debian/control 2007-12-09 04:41:17 UTC (rev 1075)
+++ trunk/testset/binary/debian/control 2007-12-09 17:15:52 UTC (rev 1076)
@@ -11,7 +11,7 @@
Package: binary
Architecture: any
Depends: ${shlibs:Depends}, xorg, binary-data (= ${Source-Version})
-Homepage: http://lintian.debian.org/
+Homepage: <http://lintian.debian.org/>
Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk
Description: test handling of binary files
Regression test for lintian's handling of binary files.
Modified: trunk/testset/relations/debian/control
===================================================================
--- trunk/testset/relations/debian/control 2007-12-09 04:41:17 UTC (rev 1075)
+++ trunk/testset/relations/debian/control 2007-12-09 17:15:52 UTC (rev 1076)
@@ -9,6 +9,7 @@
Build-Conflicts-Indep: debmake [!powerpc]
Maintainer: Debian QA Group <packages@qa.debian.org>
Standards-Version: 3.1.1
+Homepage: lintian.debian.org
Origin: Debian
Bugs: debbugs://bugs.debian.org/
Modified: trunk/testset/tags.binary
===================================================================
--- trunk/testset/tags.binary 2007-12-09 04:41:17 UTC (rev 1075)
+++ trunk/testset/tags.binary 2007-12-09 17:15:52 UTC (rev 1076)
@@ -108,6 +108,7 @@
W: binary: spelling-error-in-news-debian usefull useful
W: binary: su-to-root-with-usr-sbin /usr/lib/menu/binary:4
W: binary: su-to-root-with-usr-sbin /usr/share/menu/binary:4
+W: binary: superfluous-clutter-in-homepage <http://lintian.debian.org/>
W: binary: symlink-should-be-relative usr/share/doc/binary/html/ch3.html /usr/share/doc/binary/htm/ch1.html
W: binary: syntax-error-in-debian-changelog line 16 "couldn't parse date The, 15 Apr 2004 23:33:51 +0200"
W: binary: syntax-error-in-debian-news-file line 12 "badly formatted trailer line"
Modified: trunk/testset/tags.relations
===================================================================
--- trunk/testset/tags.relations 2007-12-09 04:41:17 UTC (rev 1075)
+++ trunk/testset/tags.relations 2007-12-09 17:15:52 UTC (rev 1076)
@@ -4,7 +4,7 @@
E: relations source: build-depends-on-essential-package-without-using-version build-depends-indep: bash
E: relations source: build-depends-on-essential-package-without-using-version build-depends: findutils
E: relations source: build-depends-on-obsolete-package build-depends-indep: debmake
-E: relations source: debian-control-with-duplicate-fields provides: 37, 38
+E: relations source: debian-control-with-duplicate-fields provides: 38, 39
E: relations source: depends-on-build-essential-package-without-using-version libc6-dev [build-depends: libc6-dev]
E: relations source: depends-on-build-essential-package-without-using-version make [build-depends-indep: make]
E: relations source: invalid-arch-string-in-source-relation test [build-conflicts: bar [alpha test]]
@@ -36,6 +36,7 @@
I: relations: unknown-field-in-control bugs
I: relations: unknown-field-in-control origin
W: relations source: ancient-standards-version 3.1.1 (current is 3.7.3)
+W: relations source: bad-homepage lintian.debian.org
W: relations source: package-has-a-duplicate-build-relation foo (= 3) [!amd64 !i386], foo (<< 4) [!amd64 !i386]
W: relations source: package-has-a-duplicate-build-relation perl, perl (>= 5.0)
W: relations source: redundant-origin-field
@@ -44,9 +45,11 @@
W: relations source: stronger-dependency-implies-weaker pre-depends -> depends gawk | awk
W: relations source: stronger-dependency-implies-weaker recommends -> suggests some-other-package
W: relations source: virtual-package-depends-without-real-package-depends build-depends: mail-transport-agent
+W: relations-multiple-libs: bad-homepage lintian.debian.org
W: relations-multiple-libs: description-synopsis-might-not-be-phrased-properly
W: relations-multiple-libs: redundant-bugs-field
W: relations-multiple-libs: redundant-origin-field
+W: relations: bad-homepage lintian.debian.org
W: relations: depends-on-old-emacs recommends: emacs21
W: relations: package-relation-with-self depends: relations (<< 3)
W: relations: package-relation-with-self replaces: relations
Reply to: