Received: by mail.netbsd.org (Postfix, from userid 605) id A845584DD7; Sat, 16 May 2020 12:43:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 325EC84D88 for ; Sat, 16 May 2020 12:43:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id MoAU1LlNjPuv for ; Sat, 16 May 2020 12:43:10 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id A268D84C8B for ; Sat, 16 May 2020 12:43:10 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id A0282FB27; Sat, 16 May 2020 12:43:10 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1589632990210580" MIME-Version: 1.0 Date: Sat, 16 May 2020 12:43:10 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20200516124310.A0282FB27@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1589632990210580 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Sat May 16 12:43:10 UTC 2020 Modified Files: pkgsrc/games/bastet: Makefile pkgsrc/mk/scripts: subst-identity.awk pkgsrc/regress/infra-unittests: subst.sh Log Message: mk/subst.mk: properly detect s,a,a,1 as identity substitution Seen in games/bastet. The 1 is not necessary though since it only repeats the default behavior of sed. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 pkgsrc/games/bastet/Makefile cvs rdiff -u -r1.3 -r1.4 pkgsrc/mk/scripts/subst-identity.awk cvs rdiff -u -r1.40 -r1.41 pkgsrc/regress/infra-unittests/subst.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1589632990210580 Content-Disposition: inline Content-Length: 2315 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/games/bastet/Makefile diff -u pkgsrc/games/bastet/Makefile:1.23 pkgsrc/games/bastet/Makefile:1.24 --- pkgsrc/games/bastet/Makefile:1.23 Wed May 6 14:04:31 2020 +++ pkgsrc/games/bastet/Makefile Sat May 16 12:43:10 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2020/05/06 14:04:31 adam Exp $ +# $NetBSD: Makefile,v 1.24 2020/05/16 12:43:10 rillig Exp $ DISTNAME= bastet-0.43.2 PKGREVISION= 2 @@ -22,7 +22,7 @@ SUBST_CLASSES+= vardir SUBST_STAGE.vardir= pre-configure SUBST_FILES.vardir= Config.cpp SUBST_MESSAGE.vardir= Fixing VARBASE. -SUBST_SED.vardir= -e "s|/var/games|${VARBASE}/games|1" +SUBST_SED.vardir= -e "s|/var/games|${VARBASE}/games|" REQD_FILES_PERMS+= /dev/null ${VARBASE}/games/bastet.scores2 ${GAMEDATA_PERMS} Index: pkgsrc/mk/scripts/subst-identity.awk diff -u pkgsrc/mk/scripts/subst-identity.awk:1.3 pkgsrc/mk/scripts/subst-identity.awk:1.4 --- pkgsrc/mk/scripts/subst-identity.awk:1.3 Mon May 11 19:52:14 2020 +++ pkgsrc/mk/scripts/subst-identity.awk Sat May 16 12:43:10 2020 @@ -1,5 +1,5 @@ #! /usr/bin/awk -f -# $NetBSD: subst-identity.awk,v 1.3 2020/05/11 19:52:14 rillig Exp $ +# $NetBSD: subst-identity.awk,v 1.4 2020/05/16 12:43:10 rillig Exp $ # # Tests whether a sed(1) command line consists of only identity substitutions # like s,id,id,. @@ -45,7 +45,7 @@ function is_identity_subst(s, len, i, pat_from = substr(s, 3, i - 3); subst = "s" sep pat_from sep pat_to sep; - return s == subst || s == subst "g"; + return s == subst || s == subst "g" || s == subst "1"; } function main( i) { Index: pkgsrc/regress/infra-unittests/subst.sh diff -u pkgsrc/regress/infra-unittests/subst.sh:1.40 pkgsrc/regress/infra-unittests/subst.sh:1.41 --- pkgsrc/regress/infra-unittests/subst.sh:1.40 Tue May 12 05:34:04 2020 +++ pkgsrc/regress/infra-unittests/subst.sh Sat May 16 12:43:10 2020 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: subst.sh,v 1.40 2020/05/12 05:34:04 rillig Exp $ +# $NetBSD: subst.sh,v 1.41 2020/05/16 12:43:10 rillig Exp $ # # Tests for mk/subst.mk. # @@ -1192,6 +1192,9 @@ if test_case_begin 'identity substitutio assert_identity 'no' -e 's,^a,^a,' assert_identity 'no' -e 's,\(^aaa\)aaa,\(^aaa\)aaa,' + # Seen in games/bastet before 2020-05-16. + assert_identity 'yes' -e 's,a,a,1' + test_case_end fi --_----------=_1589632990210580--