Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 10E951A9239 for ; Mon, 21 Mar 2022 22:30:09 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 41A4884EC3; Mon, 21 Mar 2022 22:30:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 7B86084EC0 for ; Mon, 21 Mar 2022 22:30:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id wiVnQCjb1zos for ; Mon, 21 Mar 2022 22:30:06 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id D7CD484E86 for ; Mon, 21 Mar 2022 22:30:06 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id D1445FB24; Mon, 21 Mar 2022 22:30:06 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_164790180680510" MIME-Version: 1.0 Date: Mon, 21 Mar 2022 22:30:06 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/pkgtools/pkglint To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20220321223006.D1445FB24@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_164790180680510 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Mon Mar 21 22:30:06 UTC 2022 Modified Files: pkgsrc/pkgtools/pkglint: Makefile pkgsrc/pkgtools/pkglint/files: mkassignchecker.go mkassignchecker_test.go Log Message: pkgtools/pkglint: update to 22.1.0 Changes since 21.4.4: Python packages that declare 2.7 as an incompatible Python version no longer need to provide a rationale for this since it is common knowledge that Python 2.7 is old and therefore unsupported by many modern packages. To generate a diff of this commit: cvs rdiff -u -r1.713 -r1.714 pkgsrc/pkgtools/pkglint/Makefile cvs rdiff -u -r1.12 -r1.13 pkgsrc/pkgtools/pkglint/files/mkassignchecker.go cvs rdiff -u -r1.9 -r1.10 \ pkgsrc/pkgtools/pkglint/files/mkassignchecker_test.go Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_164790180680510 Content-Disposition: inline Content-Length: 2923 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/pkglint/Makefile diff -u pkgsrc/pkgtools/pkglint/Makefile:1.713 pkgsrc/pkgtools/pkglint/Makefile:1.714 --- pkgsrc/pkgtools/pkglint/Makefile:1.713 Sat Mar 12 12:03:40 2022 +++ pkgsrc/pkgtools/pkglint/Makefile Mon Mar 21 22:30:06 2022 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.713 2022/03/12 12:03:40 rillig Exp $ +# $NetBSD: Makefile,v 1.714 2022/03/21 22:30:06 rillig Exp $ -PKGNAME= pkglint-21.4.4 +PKGNAME= pkglint-22.1.0 CATEGORIES= pkgtools DISTNAME= tools MASTER_SITES= ${MASTER_SITE_GITHUB:=golang/} Index: pkgsrc/pkgtools/pkglint/files/mkassignchecker.go diff -u pkgsrc/pkgtools/pkglint/files/mkassignchecker.go:1.12 pkgsrc/pkgtools/pkglint/files/mkassignchecker.go:1.13 --- pkgsrc/pkgtools/pkglint/files/mkassignchecker.go:1.12 Sat Jan 1 12:44:24 2022 +++ pkgsrc/pkgtools/pkglint/files/mkassignchecker.go Mon Mar 21 22:30:06 2022 @@ -345,7 +345,8 @@ func (ck *MkAssignChecker) checkLeftRati } mkline := ck.MkLine - vartype := G.Pkgsrc.VariableType(ck.MkLines, mkline.Varname()) + varname := mkline.Varname() + vartype := G.Pkgsrc.VariableType(ck.MkLines, varname) if vartype == nil || !vartype.NeedsRationale() { return } @@ -354,7 +355,13 @@ func (ck *MkAssignChecker) checkLeftRati return } - mkline.Warnf("Setting variable %s should have a rationale.", mkline.Varname()) + if varname == "PYTHON_VERSIONS_INCOMPATIBLE" && mkline.Value() == "27" { + // No warning since it is rather common that a modern Python + // package supports all Python versions starting with 3.0. + return + } + + mkline.Warnf("Setting variable %s should have a rationale.", varname) mkline.Explain( "Since this variable prevents the package from being built in some situations,", "the reasons for this restriction should be documented.", Index: pkgsrc/pkgtools/pkglint/files/mkassignchecker_test.go diff -u pkgsrc/pkgtools/pkglint/files/mkassignchecker_test.go:1.9 pkgsrc/pkgtools/pkglint/files/mkassignchecker_test.go:1.10 --- pkgsrc/pkgtools/pkglint/files/mkassignchecker_test.go:1.9 Sun Jan 16 19:14:52 2022 +++ pkgsrc/pkgtools/pkglint/files/mkassignchecker_test.go Mon Mar 21 22:30:06 2022 @@ -645,7 +645,19 @@ func (s *Suite) Test_MkAssignChecker_che "WARN: filename.mk:1: Setting variable NOT_FOR_PLATFORM should have a rationale.", "WARN: filename.mk:2: Setting variable NOT_FOR_PLATFORM should have a rationale.") - // The whole rationale check is only enabled when -Wextra is given. + // Many Python modules support Python 3 only. + // These don't need a rationale since this case is common knowledge. + testLines( + lines( + MkCvsID, + "", + "PYTHON_VERSIONS_INCOMPATIBLE=\t27", + "", + "PYTHON_VERSIONS_INCOMPATIBLE=\t38"), + "WARN: filename.mk:5: Setting variable "+ + "PYTHON_VERSIONS_INCOMPATIBLE should have a rationale.") + + // The rationale check is only enabled when -Wextra is given. t.SetUpCommandLine() test( --_----------=_164790180680510--