diff options
author | marcus <marcus@FreeBSD.org> | 2005-10-23 03:44:50 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2005-10-23 03:44:50 +0800 |
commit | 2502a010272ca823b2ca0731134c274346ec358c (patch) | |
tree | f747d705faae882c2d76532b932d9a62d762934d /ports-mgmt | |
parent | d383535eba7d6bf7f12b269b87ecd672c6a46a82 (diff) | |
download | freebsd-ports-gnome-2502a010272ca823b2ca0731134c274346ec358c.tar.gz freebsd-ports-gnome-2502a010272ca823b2ca0731134c274346ec358c.tar.zst freebsd-ports-gnome-2502a010272ca823b2ca0731134c274346ec358c.zip |
Update to 2.7.5.
* Add a check for improperly quoted COMMENTs. [1]
* Require quotes around all of BROKEN, FORBIDDEN, MANUAL_PACKAGE_BUILD,
NO_CDROM, NO_PACKAGE, and RESTRICTED. Also, enforce the obscure rules around
DEPRECATED. [2]
PR: 87273 [1]
87498 [2]
Submitted by: erwin [1]
fenner [2]
Diffstat (limited to 'ports-mgmt')
-rw-r--r-- | ports-mgmt/portlint/Makefile | 2 | ||||
-rw-r--r-- | ports-mgmt/portlint/src/portlint.pl | 43 |
2 files changed, 37 insertions, 8 deletions
diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile index 2abdf192b85b..3f5da09594d1 100644 --- a/ports-mgmt/portlint/Makefile +++ b/ports-mgmt/portlint/Makefile @@ -8,7 +8,7 @@ # PORTNAME= portlint -PORTVERSION= 2.7.4 +PORTVERSION= 2.7.5 CATEGORIES= devel MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index 9d305eb2e794..20a32d269da1 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$ -# $MCom: portlint/portlint.pl,v 1.86 2005/10/09 18:51:51 marcus Exp $ +# $MCom: portlint/portlint.pl,v 1.89 2005/10/22 19:43:02 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 = 4; +my $micro = 5; sub l { '[{(]'; } sub r { '[)}]'; } @@ -1188,13 +1188,42 @@ sub checkmakefile { } # - # whole file: BROKEN + # whole file: BROKEN et al. # - print "OK: checking BROKEN.\n" if ($verbose); - if ($whole =~ /\nBROKEN[+?]?=[ \t][^"]+\w+/) { + my($var); + foreach $var qw(BROKEN FORBIDDEN MANUAL_PACKAGE_BUILD NO_CDROM NO_PACKAGE RESTRICTED) { + print "OK: checking ${var}.\n" if ($verbose); + if ($whole =~ /\n${var}[+?]?=[ \t]?[^"]+\w+/) { + my $lineno = &linenumber($`); + &perror("WARN: $file [$lineno]: ${var} messages should be ". + "quoted."); + } + } + + # + # whole file: DEPRECATED + # + print "OK: checking DEPRECATED.\n" if ($verbose); + if ($whole =~ /\nDEPRECATED[+?]?=[ \t]*"/ && + $whole !~ /\nDEPRECATED[+?]?=[ \t]*"\$\{BROKEN\}"/) { + my $lineno = &linenumber($`); + &perror("WARN: $file [$lineno]: DEPRECATED messages should not ". + "be quoted unless they are exactly \"\${BROKEN}\"."); + } + if ($whole =~ /\nDEPRECATED[+?]?=[^"]*\$\{BROKEN\}/) { my $lineno = &linenumber($`); - &perror("WARN: $file [$lineno]: BROKEN messages should be ". - "quoted."); + &perror("WARN: $file [$lineno]: \"\${BROKEN}\" must be quoted ". + "when it is the source of DEPRECATED."); + } + + # + # whole file: COMMENT + # + print "OK: checking COMMENT.\n" if ($verbose); + if ($whole =~ /^COMMENT[+?]?=[ \t]+"[^"+]"$/m) { + my $lineno = &linenumber($`); + &perror("WARN: $file [$lineno]: COMMENT messages should not ". + "be quoted."); } # |