diff options
author | marcus <marcus@FreeBSD.org> | 2010-11-08 06:10:56 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2010-11-08 06:10:56 +0800 |
commit | 18ae86d1a17f36149d725bbdd03f8e984cfddebc (patch) | |
tree | c131bc2b177e5c3b218317d2313e2f6aac8e714a | |
parent | dc74ba1069705dcee6f3df3c97dd722c45ba4f1e (diff) | |
download | freebsd-ports-gnome-18ae86d1a17f36149d725bbdd03f8e984cfddebc.tar.gz freebsd-ports-gnome-18ae86d1a17f36149d725bbdd03f8e984cfddebc.tar.zst freebsd-ports-gnome-18ae86d1a17f36149d725bbdd03f8e984cfddebc.zip |
Update to 2.13.2.
* Correct the UIDs passwd file format.
* Parse out comments when checking dependency format. [1]
* Added check for the case when LICENSE contains multiple tokens but
LICENSE_COMB do not set or equal to 'single' (instead of correct 'multi' or
'dual'). [2]
* Add support for @rmtry. [3]
PR: 150997 [1]
151966 [2]
151301 [3]
Submitted by: skv [2]
-rw-r--r-- | ports-mgmt/portlint/Makefile | 3 | ||||
-rw-r--r-- | ports-mgmt/portlint/src/portlint.pl | 28 |
2 files changed, 24 insertions, 7 deletions
diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile index 5b2c76b2a5fc..520a43d284d4 100644 --- a/ports-mgmt/portlint/Makefile +++ b/ports-mgmt/portlint/Makefile @@ -8,8 +8,7 @@ # PORTNAME= portlint -PORTVERSION= 2.13.1 -PORTREVISION= 1 +PORTVERSION= 2.13.2 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index 47bc79c8a396..52677de8cb46 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.197 2010/05/30 17:12:48 marcus Exp $ +# $MCom: portlint/portlint.pl,v 1.203 2010/11/07 22:10:25 marcus Exp $ # use strict; @@ -52,7 +52,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 13; -my $micro = 1; +my $micro = 2; sub l { '[{(]'; } sub r { '[)}]'; } @@ -199,7 +199,7 @@ my @varlist = qw( INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PKGINSTALLVER PLIST_FILES OPTIONS INSTALLS_OMF USE_GETTEXT USE_RC_SUBR DIST_SUBDIR ALLFILES IGNOREFILES CHECKSUM_ALGORITHMS INSTALLS_ICONS - GNU_CONFIGURE CONFIGURE_ARGS MASTER_SITE_SUBDIR + GNU_CONFIGURE CONFIGURE_ARGS MASTER_SITE_SUBDIR LICENSE LICENSE_COMB ); my $cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", @varlist); @@ -788,7 +788,7 @@ sub checkplist { "will not work as you expected in most cases. Use ". "pkg-deinstall or \@unexec rmdir ... if you want to ". "remove a directory such as /var/\${PORTNAME}"); - } elsif ($_ =~ /^\@(dirrm|option|stopdaemon)/) { + } elsif ($_ =~ /^\@(dirrm|option|stopdaemon|rmtry)/) { ; # no check made } elsif ($_ eq "\@cwd") { ; # @cwd by itself means change directory back to the original @@ -1044,7 +1044,7 @@ sub checkmfile { $format = '^[^|]*\|[^|]*\|[^|]*\|[^|]*$'; $dosort = 0; } elsif ($file =~ m/UIDs$/) { - $format = '^[^:]+:\*:[0-9]+:[0-9]+::0:0:[^:]+:[^:]+:[^:]+$'; + $format = '^[^:]+:\*:[0-9]+:[0-9]+:[^:]*:0:0:[^:]+:[^:]+:[^:]+$'; $dosort = 1; } elsif ($file =~ m/GIDs$/) { $format = '^[^:]+:\*:[0-9]+:[^:]*$'; @@ -1184,6 +1184,9 @@ sub check_depends_syntax { print "OK: checking ports listed in $j.\n" if ($verbose); foreach my $k (split(/\s+/, $i)) { + if ($k =~ /^#/) { + last; + } my @l = split(':', $k); print "OK: checking dependency value for $j.\n" @@ -2399,6 +2402,21 @@ DIST_SUBDIR EXTRACT_ONLY } } + # check value of LICENSE_COMB + if ($makevar{LICENSE_COMB} && $makevar{LICENSE_COMB} !~ /^(single|dual|multi$)/) { + &perror("FATAL", $file, -1, "LICENSE_COMB contains invalid value '$1' - must be one of 'single', 'dual', 'multi'"); + } + + # check LICENSE + if ($makevar{LICENSE} && $makevar{LICENSE} ne '') { + my $comb = $makevar{LICENSE_COMB} // 'single'; + + my @tokens = split(/ /, $makevar{LICENSE}); + if ($comb eq 'single' && scalar(@tokens) > 1) { + &perror("FATAL", $file, -1, "LICENSE contains multiple licenses but LICENSE_COMB is not set to 'dual' or 'multi'"); + } + } + # check the URL if (($tmp =~ /\nMASTER_SITES[+?]?=[ \t]*([^\n]*)\n/ && $1 !~ /^[ \t]*$/) || ($makevar{MASTER_SITES} ne '')) { |