From owner-svn-ports-all@freebsd.org Sun May 31 15:17:25 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 089EB33729A; Sun, 31 May 2020 15:17:25 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ZhkD6TtBz4Fxm; Sun, 31 May 2020 15:17:24 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D58381BEB6; Sun, 31 May 2020 15:17:24 +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 04VFHOg5035784; Sun, 31 May 2020 15:17:24 GMT (envelope-from marcus@FreeBSD.org) Received: (from marcus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04VFHOJg035782; Sun, 31 May 2020 15:17:24 GMT (envelope-from marcus@FreeBSD.org) Message-Id: <202005311517.04VFHOJg035782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcus set sender to marcus@FreeBSD.org using -f From: Joe Marcus Clarke Date: Sun, 31 May 2020 15:17:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r537171 - in head/ports-mgmt/portlint: . src X-SVN-Group: ports-head X-SVN-Commit-Author: marcus X-SVN-Commit-Paths: in head/ports-mgmt/portlint: . src X-SVN-Commit-Revision: 537171 X-SVN-Commit-Repository: ports 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.33 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, 31 May 2020 15:17:25 -0000 Author: marcus Date: Sun May 31 15:17:24 2020 New Revision: 537171 URL: https://svnweb.freebsd.org/changeset/ports/537171 Log: Update to 2.19.2. The makevar padding method was missing leading and trailing variable values when those values were undefined. Try to be better about this. 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 May 31 14:45:20 2020 (r537170) +++ head/ports-mgmt/portlint/Makefile Sun May 31 15:17:24 2020 (r537171) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= portlint -PORTVERSION= 2.19.1 -PORTREVISION= 1 +PORTVERSION= 2.19.2 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none Modified: head/ports-mgmt/portlint/src/portlint.pl ============================================================================== --- head/ports-mgmt/portlint/src/portlint.pl Sun May 31 14:45:20 2020 (r537170) +++ head/ports-mgmt/portlint/src/portlint.pl Sun May 31 15:17:24 2020 (r537171) @@ -15,7 +15,7 @@ # was removed. # # $FreeBSD$ -# $MCom: portlint/portlint.pl,v 1.512 2020/05/30 23:14:06 jclarke Exp $ +# $MCom: portlint/portlint.pl,v 1.515 2020/05/31 15:15:06 jclarke Exp $ # use strict; @@ -50,7 +50,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 19; -my $micro = 1; +my $micro = 2; # default setting - for FreeBSD my $portsdir = '/usr/ports'; @@ -1972,7 +1972,7 @@ sub checkmakefile { ); print "OK: checking to see if certain macros are sorted.\n" if ($verbose); foreach my $sorted_macro (@macros_to_sort) { - while ($whole =~ /\n$sorted_macro.?=\s*([^#]+)(#.*)?\n/g) { + while ($whole =~ /\n$sorted_macro.?=\s*([^#\n]+)(#.*)?\n/g) { my $lineno = &linenumber($`); my $srex = $1; $srex =~ s/\s+$//; @@ -3831,11 +3831,19 @@ sub get_makevar { $result = `$cmd`; chomp $result; - $result =~ s/\n\n/\n\0\n/g; + # This bit of magic is interesting and repeated in the get_make* functions. + # It will ensure that all empty values for macros are replaced with a '\0' character + # to preserve their "place in line" for future parsing. This is only needed when passing + # multiple variables to these functions. + no warnings 'uninitialized'; + $result =~ s/(?:^|(?<=\n))(?=\n|$)/$1\0$3/g; if (${^CHILD_ERROR_NATIVE} != 0) { die "\nFATAL ERROR: make(1) died with status ${^CHILD_ERROR_NATIVE} and returned '$result'"; } + # If the final value is just a '\0' strip it out. + $result =~ s/^\0$//; + return $result; } @@ -3846,11 +3854,14 @@ sub get_makevar_shallow { $result = `$cmd`; chomp $result; - $result =~ s/\n\n/\n\0\n/g; + no warnings 'uninitialized'; + $result =~ s/(?:^|(?<=\n))(?=\n|$)/$1\0$3/g; if (${^CHILD_ERROR_NATIVE} != 0) { die "\nFATAL ERROR: make(1) died with status ${^CHILD_ERROR_NATIVE} and returned '$result'"; } + $result =~ s/^\0$//; + return $result; } @@ -3861,11 +3872,14 @@ sub get_makevar_raw { $result = `$cmd`; chomp $result; - $result =~ s/\n\n/\n\0\n/g; + no warnings 'uninitialized'; + $result =~ s/(?:^|(?<=\n))(?=\n|$)/$1\0$3/g; if (${^CHILD_ERROR_NATIVE} != 0) { die "\nFATAL ERROR: make(1) died with status ${^CHILD_ERROR_NATIVE} and returned '$result'"; } + $result =~ s/^\0$//; + return $result; } @@ -3877,10 +3891,13 @@ sub get_makeconf_var { $result =`$cmd`; chomp $result; - $result =~ s/\n\n/\n\0\n/g; + no warnings 'uninitialized'; + $result =~ s/(?:^|(?<=\n))(?=\n|$)/$1\0$3/g; if (${^CHILD_ERROR_NATIVE} != 0) { die "\nFATAL ERROR: make(1) died with status ${^CHILD_ERROR_NATIVE} and returned '$result'"; } + + $result =~ s/^\0$//; return $result; }