From owner-svn-ports-all@freebsd.org Sun Oct 25 17:27:40 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 101428689; Sun, 25 Oct 2015 17:27:40 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C33DC1293; Sun, 25 Oct 2015 17:27:39 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9PHRcXC024804; Sun, 25 Oct 2015 17:27:38 GMT (envelope-from marcus@FreeBSD.org) Received: (from marcus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9PHRckC024802; Sun, 25 Oct 2015 17:27:38 GMT (envelope-from marcus@FreeBSD.org) Message-Id: <201510251727.t9PHRckC024802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcus set sender to marcus@FreeBSD.org using -f From: Joe Marcus Clarke Date: Sun, 25 Oct 2015 17:27:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r400154 - in head/ports-mgmt/portlint: . src X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 17:27:40 -0000 Author: marcus Date: Sun Oct 25 17:27:38 2015 New Revision: 400154 URL: https://svnweb.freebsd.org/changeset/ports/400154 Log: Update to 2.16.7. * Add support for @(...) notation [1] * Remove the check for USES being sorted. Order is important. [2] * Add support for making sure @owner and @group are properly reset [3] PR: 202570 [1] 203908 [2] 202711 [3] Modified: head/ports-mgmt/portlint/Makefile head/ports-mgmt/portlint/src/portlint.pl Modified: head/ports-mgmt/portlint/Makefile ============================================================================== --- head/ports-mgmt/portlint/Makefile Sun Oct 25 16:42:56 2015 (r400153) +++ head/ports-mgmt/portlint/Makefile Sun Oct 25 17:27:38 2015 (r400154) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= portlint -PORTVERSION= 2.16.6 +PORTVERSION= 2.16.7 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none Modified: head/ports-mgmt/portlint/src/portlint.pl ============================================================================== --- head/ports-mgmt/portlint/src/portlint.pl Sun Oct 25 16:42:56 2015 (r400153) +++ head/ports-mgmt/portlint/src/portlint.pl Sun Oct 25 17:27:38 2015 (r400154) @@ -15,7 +15,7 @@ # was removed. # # $FreeBSD$ -# $MCom: portlint/portlint.pl,v 1.371 2015/08/09 22:21:09 jclarke Exp $ +# $MCom: portlint/portlint.pl,v 1.375 2015/10/25 17:25:28 jclarke Exp $ # use strict; @@ -50,7 +50,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 16; -my $micro = 6; +my $micro = 7; # default setting - for FreeBSD my $portsdir = '/usr/ports'; @@ -531,6 +531,8 @@ sub checkplist { my $seen_special = 0; my $item_count = 0; + my $owner_seen = 0; + my $group_seen = 0; # Variables that are allowed to be out-of-sync in the XXXDIR check. # E.g., %%PORTDOCS%%%%RUBY_MODDOCDIR%% will be OK because there is @@ -663,6 +665,11 @@ sub checkplist { } elsif ($_ eq "\@cwd") { ; # @cwd by itself means change directory back to the original # PREFIX. + } elsif ($_ =~ /^\@\(/) { + if ($_ !~ /^\@\([^,]*,[^,]*,[^\),]*(,[^\)]*)?\)/) { + &perror("WARN", $file, $., "Invalid use of \@(...). ". + "Arguments should be owner,group,perms[,fflags]"); + } } elsif ($_ =~ /^\@sample\s+(\S*)/) { my $sl = $.; if ($1 !~ /\.sample$/) { @@ -670,6 +677,34 @@ sub checkplist { " file that does not end in ``.sample''. Sample". " files must end in ``.sample''."); } + } elsif ($_ =~ /^\@owner/) { + if ($_ =~ /^\@owner\s+.+/) { + if ($owner_seen > 0) { + &perror("WARN", $file, $., "Nested setting of \@owner ". + "found. Reset \@owner before setting it again."); + } + $owner_seen++; + } else { + if ($owner_seen == 0) { + &perror("WARN", $file, $., "\@owner reset seen before ". + "a new owner section was started."); + } + $owner_seen--; + } + } elsif ($_ =~ /^\@group/) { + if ($_ =~ /^\@group\s+.+/) { + if ($group_seen > 0) { + &perror("WARN", $file, $., "Nested setting of \@group ". + "found. Reset \@group before setting it again."); + } + $group_seen++; + } else { + if ($group_seen == 0) { + &perror("WARN", $file, $., "\@group reset seen before ". + "a new group section was started."); + } + $group_seen--; + } } elsif ($_ =~ /^\@(dir|dirrm|dirrmtry|rmtry|option|stopdaemon|owner|group|mode|fc|fcfontsdir|fontsdir|info|shell)\b/) { ; # no check made } else { @@ -808,6 +843,16 @@ sub checkplist { } } + if ($owner_seen > 0) { + &perror("WARN", $file, -1, "A \@owner section was started but never ". + "reset. USe \@owner without any arguments to reset the owner"); + } + + if ($group_seen > 0) { + &perror("WARN", $file, -1, "A \@group section was started but never ". + "reset. Use \@group without any arguments to reset the group"); + } + if (!$seen_special && $item_count < $numpitems) { &perror("WARN", $file, -1, "There are only $item_count items in the plist. Consider using PLIST_FILES instead of pkg-plist when installing less than $numpitems items."); } @@ -1656,18 +1701,18 @@ sub checkmakefile { USE_PYTHON USE_XORG ); - print "OK: checking to see if USES_* stuff is sorted.\n" if ($verbose); - foreach my $sorted_use (@uses_to_sort) { - while ($whole =~ /\n$sorted_use.?=\s*(.+)\n/g) { - my $lineno = &linenumber($`); - my $srex = $1; - my @suses = sort(split / /, $srex); - if (join(" ", @suses) ne $srex) { - &perror("WARN", $file, $lineno, "the options to $sorted_use ". - "are not sorted. Please consider sorting them."); - } - } - } +# print "OK: checking to see if USES_* stuff is sorted.\n" if ($verbose); +# foreach my $sorted_use (@uses_to_sort) { +# while ($whole =~ /\n$sorted_use.?=\s*(.+)\n/g) { +# my $lineno = &linenumber($`); +# my $srex = $1; +# my @suses = sort(split / /, $srex); +# if (join(" ", @suses) ne $srex) { +# &perror("WARN", $file, $lineno, "the options to $sorted_use ". +# "are not sorted. Please consider sorting them."); +# } +# } +# } # # whole file: USE_GNOME=pkgconfig