Date: Mon, 19 Apr 2021 20:52:33 GMT From: Joe Marcus Clarke <marcus@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: f36c30ba1869 - main - ports-mgmt/portlint: Update to 2.19.5 Message-ID: <202104192052.13JKqXCO033213@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by marcus: URL: https://cgit.FreeBSD.org/ports/commit/?id=f36c30ba1869da25e384c007f85ef3d1e763a586 commit f36c30ba1869da25e384c007f85ef3d1e763a586 Author: Joe Marcus Clarke <marcus@FreeBSD.org> AuthorDate: 2021-04-19 20:49:33 +0000 Commit: Joe Marcus Clarke <marcus@FreeBSD.org> CommitDate: 2021-04-19 20:49:33 +0000 ports-mgmt/portlint: Update to 2.19.5 * Reverse $FreeBSD$ check logic to make the use of them FATAL [1] * Remove embedded $FreeBSD$ PR: 255153 [1] Obtained from: lwhsu [1] With issue report from Tatsuki Makino --- ports-mgmt/portlint/Makefile | 2 +- ports-mgmt/portlint/src/portlint.1 | 2 +- ports-mgmt/portlint/src/portlint.pl | 49 +++++++++---------------------------- 3 files changed, 13 insertions(+), 40 deletions(-) diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile index 548a5bf0e5bd..ad6edb127375 100644 --- a/ports-mgmt/portlint/Makefile +++ b/ports-mgmt/portlint/Makefile @@ -1,7 +1,7 @@ # Created by: Jun-ichiro itojun Hagino <itojun@itojun.org> PORTNAME= portlint -PORTVERSION= 2.19.4 +PORTVERSION= 2.19.5 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/portlint/src/portlint.1 b/ports-mgmt/portlint/src/portlint.1 index 43453faca372..bf391d28e9f3 100644 --- a/ports-mgmt/portlint/src/portlint.1 +++ b/ports-mgmt/portlint/src/portlint.1 @@ -1,4 +1,4 @@ -.\" $MCom: portlint/portlint.1,v 1.14 2020/05/30 13:03:55 jclarke Exp $ +.\" $MCom: portlint/portlint.1,v 1.15 2021/04/19 20:48:32 jclarke Exp $ .\" .\" Copyright (c) 1997 by Jun-ichiro Hagino <itojun@itojun.org>. .\" All Rights Reserved. Absolutely no warranty. diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index 61c8d9902882..329821698a0b 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -14,7 +14,7 @@ # bsd.port.mk. There are significant differences in those so non-FreeBSD code # was removed. # -# $MCom: portlint/portlint.pl,v 1.522 2020/12/27 19:19:02 jclarke Exp $ +# $MCom: portlint/portlint.pl,v 1.525 2021/04/19 20:48:32 jclarke Exp $ # use strict; @@ -49,7 +49,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 19; -my $micro = 4; +my $micro = 5; # default setting - for FreeBSD my $portsdir = '/usr/ports'; @@ -138,7 +138,6 @@ my $mfile_gids = "${portsdir}/GIDs"; if ($verbose) { print "OK: config: portsdir: \"$portsdir\" ". - "rcsidstr: \"$rcsidstr\" ". "localbase: $localbase ". "\n"; } @@ -588,7 +587,6 @@ sub checkdescr { sub checkplist { my($file) = @_; my($curdir) = ($localbase); - my($rcsidseen) = (0); my $seen_special = 0; my $item_count = 0; @@ -726,7 +724,7 @@ sub checkplist { "for more details)."); } } elsif ($_ =~ /^\@(comment)/) { - $rcsidseen++ if (/\$$rcsidstr[:\$]/); + &perror("FATAL", $file, $., "\$$rcsidstr\$ is deprecated in Git.") if (/\$$rcsidstr[:\$]/); } elsif ($_ =~ m!^\@(dirrm|dirrmtry)\s+/!) { &perror("WARN", $file, $., "Using \@$1 with absolute path ". "will not work as you expected in most cases. Use ". @@ -1443,20 +1441,19 @@ sub checkmakefile { print "OK: checking header in $file.\n" if ($verbose); if ($lines[1] =~ /^# (?:New )?[Pp]orts collection [mM]akefile/) { &perror("FATAL", $file, 1, "old style headers found."); + } elsif ($lines[1] =~ /^# \$$rcsidstr[:\$]/) { + &perror("FATAL", $file, 1, "\$$rcsidstr\$ is deprecated in Git."); } elsif ($lines[1] =~ /^# Created by: \S/) { - if ($lines[2] !~ /^# \$$rcsidstr[:\$]/) { - &perror("FATAL", $file, 2, "header should be ". - "followed by \$$rcsidstr\$."); - } elsif ($lines[3] !~ /^$/) { - #&perror("FATAL", $file, 3, "do not add extra ". + if ($lines[2] =~ /^# \$$rcsidstr[:\$]/) { + &perror("FATAL", $file, 2, "\$$rcsidstr\$ is deprecated in Git."); + } + if ($lines[2] !~ /^$/) { + #&perror("FATAL", $file, 2, "do not add extra ". # "empty comments after header."); } # special case for $rcsidsrt\nMCom: - } elsif ($lines[1] =~ /^# \$$rcsidstr[:\$]/ and $lines[2] =~ /^#\s+\$MCom[:\$]/ and $lines[3] =~ /^$/) { + } elsif ($lines[1] =~ /^#\s+\$MCom[:\$]/ and $lines[2] =~ /^$/) { # DO NOTHING - } elsif ($lines[1] !~ /^# \$$rcsidstr[:\$]/ or $lines[2] !~ /^$/) { - &perror("FATAL", $file, 1, "incorrect header; ". - "simply use \$$rcsidstr\$."); } # @@ -2685,30 +2682,6 @@ EOF if ($tmp =~ m/Version [rR]equired/) { &perror("WARN", $file, -1, "Version required is no longer needed in the comment section."); } - my $tmp2 = ""; - for (split(/\n/, $tmp)) { - $tmp2 .= $_ if (m/\$$rcsidstr/); - } - if ($tmp2 !~ /#(\s+)\$$rcsidstr([^\$]*)\$$/) { - - &perror("FATAL", $file, -1, "no \$$rcsidstr\$ line in comment ". - "section."); - } else { - print "OK: \$$rcsidstr\$ seen in $file.\n" if ($verbose); - if ($1 ne ' ') { - &perror("WARN", $file, -1, "please use single whitespace ". - "right before \$$rcsidstr\$ tag."); - } - if ($2 ne '') { - if ($verbose || $newport) { # XXX - &perror("WARN", $file, -1, - ($newport ? 'for new port, ' - : 'is it a new port? if so, '). - "make \$$rcsidstr\$ tag in comment ". - "section empty, to make SVN happy."); - } - } - } # # for the rest of the checks, comment lines are not important.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104192052.13JKqXCO033213>