The following commit has been merged in the master branch:
commit 97d77d7fa5dae4f89f59727dce6929a863033149
Author: Niels Thykier <[email protected]>
Date:   Thu Sep 8 22:01:59 2011 +0200

    Ignore "<>"-brackets in some homepage checks

diff --git a/checks/fields b/checks/fields
index de76d71..1fbb0e1 100644
--- a/checks/fields
+++ b/checks/fields
@@ -476,11 +476,13 @@ if (not defined $info->field('priority')) {
 
 if (defined $info->field('homepage')) {
        my $homepage = $info->field('homepage');
+       my $orig = $homepage;
 
        unfold('homepage', \$homepage);
 
        if ($homepage =~ /^<(?:UR[LI]:)?.*>$/i) {
-               tag 'superfluous-clutter-in-homepage', $homepage;
+               tag 'superfluous-clutter-in-homepage', $orig;
+               $homepage = substr($homepage, 1, length($homepage) - 2);
        }
 
        require URI;
@@ -488,11 +490,11 @@ if (defined $info->field('homepage')) {
 
        # not an absolute URI or (most likely) an invalid protocol
        unless ($uri->scheme && $uri->scheme =~ m/^ftp|https?|gopher$/o) {
-               tag 'bad-homepage', $homepage;
+               tag 'bad-homepage', $orig;
        }
 
        if ($homepage =~ m,/search\.cpan\.org/.*-[0-9._]+/*$,) {
-               tag 'homepage-for-cpan-package-contains-version', $homepage;
+               tag 'homepage-for-cpan-package-contains-version', $orig;
        }
 } elsif ($type eq 'binary' and not $info->native) {
        tag 'no-homepage-field';
diff --git a/debian/changelog b/debian/changelog
index a1b55c7..8cca8be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -82,6 +82,9 @@ lintian (2.5.3) UNRELEASED; urgency=low
       be using a known protocol (for homepages).  (Closes: #580427)
     + [JW] Bumped the severity of "no-human-maintainers", since it is
       now a Policy "must" directive.  (Closes: #640856)
+    + [JW,NT] If superfluous-clutter-in-homepage has been emitted,
+      ignore the surrounding "<>" for the rest of the homepage checks.
+      (Closes: #640947)
   * checks/{filename-length,rules}.desc:
     + [NT] Improved the descriptions of some tags.  (Closes: #639018)
   * checks/files{,.desc}:
diff --git a/t/COVERAGE b/t/COVERAGE
index 8d84549..1555f42 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,4 +1,4 @@
-Last generated 2011-09-07
+Last generated 2011-09-08
 Coverage: 720/935 (77.01%), w. legacy tests: 842/935 (90.05%)
 
 The following tags are not tested by the test suite:
diff --git a/t/tests/fields-bad-homepage/debian/debian/control.in 
b/t/tests/fields-bad-homepage/debian/debian/control.in
index fa722cd..0cdefad 100644
--- a/t/tests/fields-bad-homepage/debian/debian/control.in
+++ b/t/tests/fields-bad-homepage/debian/debian/control.in
@@ -15,3 +15,5 @@ Description: {$description}
  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.
+# ... and some unneeded <>
+Homepage: <http://lintian.debian.org/>
diff --git a/t/tests/fields-bad-homepage/desc b/t/tests/fields-bad-homepage/desc
index f1527fc..fde2725 100644
--- a/t/tests/fields-bad-homepage/desc
+++ b/t/tests/fields-bad-homepage/desc
@@ -2,4 +2,6 @@ Testname: fields-bad-homepage
 Sequence: 6000
 Version: 1.0
 Description: Test for invalid Homepage protocol
-Test-For: bad-homepage
+Test-For:
+ bad-homepage
+ superfluous-clutter-in-homepage
diff --git a/t/tests/fields-bad-homepage/tags b/t/tests/fields-bad-homepage/tags
index 8312c0a..88c1ce9 100644
--- a/t/tests/fields-bad-homepage/tags
+++ b/t/tests/fields-bad-homepage/tags
@@ -1,2 +1,2 @@
 W: fields-bad-homepage source: bad-homepage ttp://lintian.debian.org/
-W: fields-bad-homepage: bad-homepage ttp://lintian.debian.org/
+W: fields-bad-homepage: superfluous-clutter-in-homepage 
<http://lintian.debian.org/>

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to