View | Details | Raw Unified | Return to bug 255153
Collapse All | Expand All

(-)b/ports-mgmt/portlint/Makefile (-1 / +1 lines)
Lines 1-7 Link Here
1
# Created by: Jun-ichiro itojun Hagino <itojun@itojun.org>
1
# Created by: Jun-ichiro itojun Hagino <itojun@itojun.org>
2
2
3
PORTNAME=	portlint
3
PORTNAME=	portlint
4
PORTVERSION=	2.19.4
4
PORTVERSION=	2.19.5
5
CATEGORIES=	ports-mgmt
5
CATEGORIES=	ports-mgmt
6
MASTER_SITES=	# none
6
MASTER_SITES=	# none
7
DISTFILES=	# none
7
DISTFILES=	# none
(-)b/ports-mgmt/portlint/src/portlint.pl (-35 / +9 lines)
Lines 138-144 my $mfile_gids = "${portsdir}/GIDs"; Link Here
138
138
139
if ($verbose) {
139
if ($verbose) {
140
	print "OK: config: portsdir: \"$portsdir\" ".
140
	print "OK: config: portsdir: \"$portsdir\" ".
141
		"rcsidstr: \"$rcsidstr\" ".
142
		"localbase: $localbase ".
141
		"localbase: $localbase ".
143
		"\n";
142
		"\n";
144
}
143
}
Lines 727-732 sub checkplist { Link Here
727
				}
726
				}
728
			} elsif ($_ =~ /^\@(comment)/) {
727
			} elsif ($_ =~ /^\@(comment)/) {
729
				$rcsidseen++ if (/\$$rcsidstr[:\$]/);
728
				$rcsidseen++ if (/\$$rcsidstr[:\$]/);
729
				&perror("FATAL", $file, $., "\$$rcsidstr\$ is deprecated in Git.");
730
			} elsif ($_ =~ m!^\@(dirrm|dirrmtry)\s+/!) {
730
			} elsif ($_ =~ m!^\@(dirrm|dirrmtry)\s+/!) {
731
				&perror("WARN", $file, $., "Using \@$1 with absolute path ".
731
				&perror("WARN", $file, $., "Using \@$1 with absolute path ".
732
					"will not work as you expected in most cases.  Use ".
732
					"will not work as you expected in most cases.  Use ".
Lines 1443-1462 sub checkmakefile { Link Here
1443
	print "OK: checking header in $file.\n" if ($verbose);
1443
	print "OK: checking header in $file.\n" if ($verbose);
1444
	if ($lines[1] =~ /^# (?:New )?[Pp]orts collection [mM]akefile/) {
1444
	if ($lines[1] =~ /^# (?:New )?[Pp]orts collection [mM]akefile/) {
1445
		&perror("FATAL", $file, 1, "old style headers found.");
1445
		&perror("FATAL", $file, 1, "old style headers found.");
1446
	} elsif ($lines[1] =~ /^# \$$rcsidstr[:\$]/) {
1447
		&perror("FATAL", $file, 1, "\$$rcsidstr\$ is deprecated in Git.");
1446
	} elsif ($lines[1] =~ /^# Created by: \S/) {
1448
	} elsif ($lines[1] =~ /^# Created by: \S/) {
1447
		if ($lines[2] !~ /^# \$$rcsidstr[:\$]/) {
1449
		if ($lines[2] =~ /^# \$$rcsidstr[:\$]/) {
1448
			&perror("FATAL", $file, 2, "header should be ".
1450
			&perror("FATAL", $file, 2, "\$$rcsidstr\$ is deprecated in Git.");
1449
				"followed by \$$rcsidstr\$.");
1451
		}
1450
		} elsif ($lines[3] !~ /^$/) {
1452
		if ($lines[2] !~ /^$/) {
1451
		#&perror("FATAL", $file, 3, "do not add extra ".
1453
		#&perror("FATAL", $file, 2, "do not add extra ".
1452
		#		"empty comments after header.");
1454
		#		"empty comments after header.");
1453
		}
1455
		}
1454
	# special case for $rcsidsrt\nMCom:
1456
	# special case for $rcsidsrt\nMCom:
1455
	} elsif ($lines[1] =~ /^# \$$rcsidstr[:\$]/ and $lines[2] =~ /^#\s+\$MCom[:\$]/ and $lines[3] =~ /^$/) {
1457
	} elsif ($lines[1] =~ /^#\s+\$MCom[:\$]/ and $lines[2] =~ /^$/) {
1456
        # DO NOTHING
1458
        # DO NOTHING
1457
	} elsif ($lines[1] !~ /^# \$$rcsidstr[:\$]/ or $lines[2] !~ /^$/) {
1458
		&perror("FATAL", $file, 1, "incorrect header; ".
1459
			"simply use \$$rcsidstr\$.");
1460
	}
1459
	}
1461
1460
1462
	#
1461
	#
Lines 2685-2714 EOF Link Here
2685
	if ($tmp =~ m/Version [rR]equired/) {
2684
	if ($tmp =~ m/Version [rR]equired/) {
2686
		&perror("WARN", $file, -1, "Version required is no longer needed in the comment section.");
2685
		&perror("WARN", $file, -1, "Version required is no longer needed in the comment section.");
2687
	}
2686
	}
2688
	my $tmp2 = "";
2689
	for (split(/\n/, $tmp)) {
2690
		$tmp2 .= $_ if (m/\$$rcsidstr/);
2691
	}
2692
	if ($tmp2 !~ /#(\s+)\$$rcsidstr([^\$]*)\$$/) {
2693
2694
		&perror("FATAL", $file, -1, "no \$$rcsidstr\$ line in comment ".
2695
			"section.");
2696
	} else {
2697
		print "OK: \$$rcsidstr\$ seen in $file.\n" if ($verbose);
2698
		if ($1 ne ' ') {
2699
			&perror("WARN", $file, -1, "please use single whitespace ".
2700
				"right before \$$rcsidstr\$ tag.");
2701
		}
2702
		if ($2 ne '') {
2703
			if ($verbose || $newport) {	# XXX
2704
				&perror("WARN", $file, -1,
2705
				    ($newport ? 'for new port, '
2706
					      : 'is it a new port? if so, ').
2707
				    "make \$$rcsidstr\$ tag in comment ".
2708
				    "section empty, to make SVN happy.");
2709
			}
2710
		}
2711
	}
2712
2687
2713
	#
2688
	#
2714
	# for the rest of the checks, comment lines are not important.
2689
	# for the rest of the checks, comment lines are not important.
2715
- 

Return to bug 255153