ports/159272: [PATCH] ports-mgmt/portlint should warn about missing / on WWW:
milki
milki at rescomp.berkeley.edu
Thu Jul 28 20:30:11 UTC 2011
>Number: 159272
>Category: ports
>Synopsis: [PATCH] ports-mgmt/portlint should warn about missing / on WWW:
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Jul 28 20:30:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: milki
>Release: FreeBSD 8.2-RELEASE amd64
>Organization:
UC Berkeley - RSSP-IT
>Environment:
System: FreeBSD cibo.ircmylife.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011
>Description:
As described in the porter's handbook, the url line in pkg-descr should end with a /
Port maintainer (marcus at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
Toggle the ending / on a WWW line in pkg-descr and run portlint -C
>Fix:
--- portlint-2.13.6.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/ports-mgmt/portlint/src/portlint.pl /usr/home/milki/ports/portlint/src/portlint.pl
--- /usr/ports/ports-mgmt/portlint/src/portlint.pl 2011-07-20 22:02:54.000000000 -0700
+++ /usr/home/milki/ports/portlint/src/portlint.pl 2011-07-28 13:19:43.000000000 -0700
@@ -662,10 +662,14 @@
if ($file =~ /\bpkg-descr/ && $tmp =~ m,http://,) {
my $has_url = 0;
my $has_www = 0;
+ my $has_endslash = 0;
foreach my $line (grep($_ =~ "http://", split(/\n+/, $tmp))) {
$has_url = 1;
if ($line =~ m,WWW:[ \t]+http://,) {
$has_www = 1;
+ if ($line =~ m,/$,) {
+ $has_endslash = 1;
+ }
}
}
@@ -673,6 +677,10 @@
&perror("WARN", $file, -1, "add \"WWW: UR:\" for this port if possible");
}
+ if (!$has_endslash) {
+ &perror("WARN", $file, -1, "end WWW URL with a \"/\"");
+ }
+
if ($has_url && ! $has_www) {
&perror("FATAL", $file, -1, "contains a URL but no \"WWW:\"");
}
--- portlint-2.13.6.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list