Bug 175186 - ports-mgmt/portlint: Perl warnings in case of incomplete distinfo
Summary: ports-mgmt/portlint: Perl warnings in case of incomplete distinfo
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Joe Marcus Clarke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-10 22:30 UTC by gerald
Modified: 2013-03-10 06:20 UTC (History)
0 users

See Also:


Attachments
file.diff (427 bytes, patch)
2013-01-10 22:30 UTC, gerald
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gerald 2013-01-10 22:30:00 UTC
	When updating emulators/wine-devel, by mistake I bumped
	DISTVERSION in Makefile and then ran portlint.   This gave
	the following:
:
FATAL: /shscratch/tmp/gerald/ports.svn/emulators/wine-devel/distinfo: has no SIZE record for wine-1.5.21.tar.bz2.
Argument "/shscratch/tmp/gerald/ports.svn/emulators/wine-devel/dis..." isn't numeric in subtraction (-) at /home/gerald/bin/portlint line 610.
Argument "no checksum record for wine-1.5.21.tar.bz2." isn't numeric in numeric gt (>) at /home/gerald/bin/portlint line 3211.
Use of uninitialized value $msg in concatenation (.) or string at /home/gerald/bin/portlint line 3212.
:

How-To-Repeat: 	Set DISTVERSION of any port to something which is not covered
	in distinfo and run portlint.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-10 22:30:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->marcus

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2013-01-22 01:35:31 UTC
State Changed
From-To: open->feedback

Unless I'm missing something, the patch attached to this bug is just a 
space change.  Did you mean to include another one?
Comment 3 Joe Marcus Clarke freebsd_committer freebsd_triage 2013-01-22 01:43:08 UTC
State Changed
From-To: feedback->patched

Committed to me CVS repo pending the next release.  Thanks!
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-03-10 06:16:13 UTC
Author: marcus
Date: Sun Mar 10 06:16:05 2013
New Revision: 313807
URL: http://svnweb.freebsd.org/changeset/ports/313807

Log:
  Bump to version 2.14.2.
  
  * Add a missing comma to fix a really weird error on checking certain ports. [1]
  * Remove unused PL_CVS_IGNORE [2]
  * Add check for a single space after WWW: in pkg-descr [2]
  * Clarify 'Created by:' warning message [2]
  * Add new OPTIONS_* knobs to @options_early [2]
  * Add supported for USE_GCC=yes. [3]
  
  PR:		175186 [1]
  		175317 [2]
  		174758 [3]
  Submitted by:	gerald [1] [3]
  		ak [2]

Modified:
  head/ports-mgmt/portlint/src/portlint.pl

Modified: head/ports-mgmt/portlint/src/portlint.pl
==============================================================================
--- head/ports-mgmt/portlint/src/portlint.pl	Sun Mar 10 06:00:45 2013	(r313806)
+++ head/ports-mgmt/portlint/src/portlint.pl	Sun Mar 10 06:16:05 2013	(r313807)
@@ -17,7 +17,7 @@
 # OpenBSD and NetBSD will be accepted.
 #
 # $FreeBSD$
-# $MCom: portlint/portlint.pl,v 1.266 2012/12/29 23:23:32 marcus Exp $
+# $MCom: portlint/portlint.pl,v 1.270 2013/03/10 06:08:07 marcus Exp $
 #
 
 use strict;
@@ -52,7 +52,7 @@ $portdir = '.';
 # version variables
 my $major = 2;
 my $minor = 14;
-my $micro = 1;
+my $micro = 2;
 
 sub l { '[{(]'; }
 sub r { '[)}]'; }
@@ -161,7 +161,6 @@ foreach my $i (@osdep) {
 
 # The PORTSDIR environment variable overrides our defaults.
 $portsdir = $ENV{PORTSDIR} if ( defined $ENV{'PORTSDIR'} );
-$ENV{'PL_SVN_IGNORE'} //= '';
 my $mfile_moved = "${portsdir}/MOVED";
 my $mfile_uids = "${portsdir}/UIDs";
 my $mfile_gids = "${portsdir}/GIDs";
@@ -467,7 +466,7 @@ sub checkdistinfo {
 			$n++ if exists($records{$path}{$alg});
 		}
 		if ($n == 0) {
-			&perror("FATAL", $file -1, "no checksum record for $path.");
+			&perror("FATAL", $file, -1, "no checksum record for $path.");
 		}
 		if ($n < scalar(keys %algorithms)) {
 			&perror("WARN", $file, -1, "no checksum records for all ".
@@ -499,8 +498,12 @@ sub checkdescr {
 				"returns.  Strip all carriage returns (e.g. run dos2unix) ".
 				"in $file.");
 		}
-		if (/^WWW:\s+(\S*)/) {
-			my $wwwurl = $1;
+		if (/^WWW:(\s+)(\S*)/) {
+			my $wwwurl = $2;
+			if ($1 ne ' ') {
+				&perror("WARN", $file, -1, "use WWW: with a single space, ".
+					"then $wwwurl");
+			}
 			if ($wwwurl !~ m|^https?://|) {
 				&perror("WARN", $file, -1, "WWW URL, $wwwurl should begin ".
 					"with \"http://\" or \"https://\".");
@@ -1341,7 +1344,7 @@ sub checkmakefile {
 		}
 	} elsif ($lines[1] !~ /^# \$$rcsidstr[:\$]/ or $lines[2] !~ /^$/) {
 		&perror("FATAL", $file, 1, "incorrect header; ".
-			"use Created by: with a space, then \$$rcsidstr\$.");
+			"use Created by: with a single space, then \$$rcsidstr\$.");
 	}
 
 	#
@@ -1431,7 +1434,9 @@ sub checkmakefile {
 		OPTIONS_DEFAULT
 		OPTIONS_DEFINE
 		OPTIONS_EXCLUDE
+		OPTIONS_GROUP.*?
 		OPTIONS_MULTI.*?
+		OPTIONS_RADIO.*?
 		OPTIONS_SINGLE.*?
 	);
 
@@ -1998,7 +2003,9 @@ ruby sed sh sort sysctl touch tr which x
 	if ($whole =~ /^USE_GCC[?:]?=\s*(.*)$/m) {
 		my $lineno = &linenumber($`);
 		my $gcc_val = $1;
-		if ($gcc_val =~ /3\.[234]\+/) {
+		if ($gcc_val eq 'any' || $gcc_val eq 'yes') {
+			# Just accept these two.
+		} elsif ($gcc_val =~ /3\.[234]\+/) {
 			&perror("WARN", $file, $lineno, "USE_GCC=3.2+, USE_GCC=3.3+, ".
 				"and USE_GCC=3.4+ are noops on all currently (and future) ".
 				"supported versions of FreeBSD.  Do not use them.");
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-03-10 06:16:48 UTC
Author: marcus
Date: Sun Mar 10 06:16:40 2013
New Revision: 313808
URL: http://svnweb.freebsd.org/changeset/ports/313808

Log:
  Bump to version 2.14.2.
  
  * Add a missing comma to fix a really weird error on checking certain ports. [1]
  * Remove unused PL_CVS_IGNORE [2]
  * Add check for a single space after WWW: in pkg-descr [2]
  * Clarify 'Created by:' warning message [2]
  * Add new OPTIONS_* knobs to @options_early [2]
  * Add supported for USE_GCC=yes. [3]
  
  PR:             175186 [1]
                  175317 [2]
                  174758 [3]
  Submitted by:   gerald [1] [3]
                  ak [2]

Modified:
  head/ports-mgmt/portlint/Makefile

Modified: head/ports-mgmt/portlint/Makefile
==============================================================================
--- head/ports-mgmt/portlint/Makefile	Sun Mar 10 06:16:05 2013	(r313807)
+++ head/ports-mgmt/portlint/Makefile	Sun Mar 10 06:16:40 2013	(r313808)
@@ -5,8 +5,7 @@
 #
 
 PORTNAME=	portlint
-PORTVERSION=	2.14.1
-PORTREVISION=	1
+PORTVERSION=	2.14.2
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# none
 DISTFILES=	# none
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Joe Marcus Clarke freebsd_committer freebsd_triage 2013-03-10 06:17:33 UTC
State Changed
From-To: patched->closed

Committed, thanks!