summaryrefslogtreecommitdiff
path: root/ports-mgmt/portlint
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2005-04-13 03:20:56 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2005-04-13 03:20:56 +0000
commitfaca8eda4c9c18eccc26f894e180f25ce56db61f (patch)
treeb0dc153341238e2e861a12b775ee8a8b8f7a0537 /ports-mgmt/portlint
parent- Only give OPTIONS for clearlooks port, not clearlooks-themes (diff)
Update to 2.7.1
* Check to make sure only characters [-.a-zA-Z0-9_] appear in file names [1] * Check for proper quoting of IGNORE and BROKEN [1] * Check to see if README.html is being committed [1] * Check for uses of .elseif [2] Submitted by: krion [1] Suggested by: bsdcrank <bsdcrank@squbes.com> [2]
Notes
Notes: svn path=/head/; revision=133196
Diffstat (limited to 'ports-mgmt/portlint')
-rw-r--r--ports-mgmt/portlint/Makefile2
-rw-r--r--ports-mgmt/portlint/src/portlint.pl40
2 files changed, 39 insertions, 3 deletions
diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile
index 1496474baa05..6757d65d1b20 100644
--- a/ports-mgmt/portlint/Makefile
+++ b/ports-mgmt/portlint/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= portlint
-PORTVERSION= 2.7.0
+PORTVERSION= 2.7.1
CATEGORIES= devel
MASTER_SITES= # none
DISTFILES= # none
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl
index f906f2390df2..e6d6c7d4b5e5 100644
--- a/ports-mgmt/portlint/src/portlint.pl
+++ b/ports-mgmt/portlint/src/portlint.pl
@@ -17,7 +17,7 @@
# OpenBSD and NetBSD will be accepted.
#
# $FreeBSD$
-# $Id: portlint.pl,v 1.74 2005/03/21 19:50:06 marcus Exp $
+# $Id: portlint.pl,v 1.75 2005/04/13 03:18:22 marcus Exp $
#
use vars qw/ $opt_a $opt_A $opt_b $opt_C $opt_c $opt_h $opt_t $opt_v $opt_M $opt_N $opt_B $opt_V /;
@@ -40,7 +40,7 @@ $portdir = '.';
# version variables
my $major = 2;
my $minor = 7;
-my $micro = 0;
+my $micro = 1;
sub l { '[{(]'; }
sub r { '[)}]'; }
@@ -329,12 +329,18 @@ if ($committer) {
&perror("Warning: $fullname: dotfiles are not preferred. ".
"If this file is a dotfile to be installed as an example, ".
"consider importing it as \"dot$_\".");
+ } elsif (/[^-.a-zA-Z0-9_]/) {
+ &perror("Warning: $fullname: only use characters ".
+ "[-_.a-zA-Z0-9] for patch or script names.");
} elsif (/\.(orig|rej|bak)$/ || /~$/ || /^\#/) {
&perror("FATAL: $fullname: for safety, be sure to cleanup ".
"backup files before committing the port.");
} elsif (/(^|\.)core$/) {
&perror("FATAL: $fullname: for safety, be sure to cleanup ".
"core files before committing the port.");
+ } elsif (/README.html/) {
+ &perror("FATAL: $fullname: for safety, be sure to cleanup ".
+ "README.html files before committing the port.");
} elsif ($_ eq 'CVS' && -d) {
if ($newport) {
&perror("FATAL: $fullname: for safety, be sure to cleanup ".
@@ -1015,6 +1021,16 @@ sub checkmakefile {
}
#
+ # whole file: use of .elseif
+ #
+ print "OK: checking for use of .elseif.\n" if ($verbose);
+ if ($whole =~ /^\.\s*elseif/m) {
+ my $lineno = &linenumber($`);
+ &perror("FATAL: $file [$lineno]: use of .elseif is not supported ".
+ "in all versions of FreeBSD. Use .elif instead.");
+ }
+
+ #
# whole file: PLIST_FILES and PLIST_DIRS
#
print "OK: checking PLIST_FILES and PLIST_DIRS.\n" if ($verbose);
@@ -1130,6 +1146,26 @@ sub checkmakefile {
}
#
+ # whole file: BROKEN
+ #
+ print "OK: checking BROKEN.\n" if ($verbose);
+ if ($whole =~ /\nBROKEN[+?]?=[ \t][^"]+\w+/) {
+ my $lineno = &linenumber($`);
+ &perror("WARN: $file [$lineno]: BROKEN messages should be ".
+ "quoted.");
+ }
+
+ #
+ # whole file: IGNORE
+ #
+ print "OK: checking IGNORE.\n" if ($verbose);
+ if ($whole =~ /\nIGNORE[+?]?=[ \t]+"/) {
+ my $lineno = &linenumber($`);
+ &perror("WARN: $file [$lineno]: IGNORE messages should not ".
+ "be quoted.");
+ }
+
+ #
# whole file: PKGNAME
#
print "OK: checking PKGNAME.\n" if ($verbose);