Received: by mail.netbsd.org (Postfix, from userid 605) id D9C1684DE1; Thu, 11 Jun 2020 18:04:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 60AD684DB8 for ; Thu, 11 Jun 2020 18:04:42 +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 Qxn6TXXpDx8X for ; Thu, 11 Jun 2020 18:04:41 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id D163984CE7 for ; Thu, 11 Jun 2020 18:04:41 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id CABD0FB27; Thu, 11 Jun 2020 18:04:41 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1591898681246060" MIME-Version: 1.0 Date: Thu, 11 Jun 2020 18:04:41 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20200611180441.CABD0FB27@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. --_----------=_1591898681246060 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Thu Jun 11 18:04:41 UTC 2020 Modified Files: pkgsrc/mk: subst.mk pkgsrc/regress/infra-unittests: subst.sh Log Message: mk/subst.mk: always remove temporary file Fixes PR pkg/55364. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 pkgsrc/mk/subst.mk cvs rdiff -u -r1.47 -r1.48 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. --_----------=_1591898681246060 Content-Disposition: inline Content-Length: 1949 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/mk/subst.mk diff -u pkgsrc/mk/subst.mk:1.95 pkgsrc/mk/subst.mk:1.96 --- pkgsrc/mk/subst.mk:1.95 Wed Jun 3 10:56:46 2020 +++ pkgsrc/mk/subst.mk Thu Jun 11 18:04:41 2020 @@ -1,4 +1,4 @@ -# $NetBSD: subst.mk,v 1.95 2020/06/03 10:56:46 gdt Exp $ +# $NetBSD: subst.mk,v 1.96 2020/06/11 18:04:41 rillig Exp $ # # The subst framework replaces text in one or more files in the WRKSRC # directory. Packages can define several ``classes'' of replacements. @@ -204,11 +204,9 @@ ${_SUBST_COOKIE.${class}}: ${CMP} -s "$$tmpfile" "$$file" && { \ ${AWK} -f ${PKGSRCDIR}/mk/scripts/subst-identity.awk -- ${SUBST_SED.${class}} \ && found=$$(LC_ALL=C ${SED} -n ${SUBST_SED.${class}:C,^['"]?s.*,&p,} "$$file") \ - && [ -n "$$found" ] && { \ - changed=yes; \ - continue; \ - }; \ - ${_SUBST_WARN.${class}} "Nothing changed in \"$$file\"."; \ + && [ -n "$$found" ] \ + && changed=yes \ + || ${_SUBST_WARN.${class}} "Nothing changed in \"$$file\"."; \ ${RM} -f "$$tmpfile"; \ continue; \ }; \ Index: pkgsrc/regress/infra-unittests/subst.sh diff -u pkgsrc/regress/infra-unittests/subst.sh:1.47 pkgsrc/regress/infra-unittests/subst.sh:1.48 --- pkgsrc/regress/infra-unittests/subst.sh:1.47 Thu Jun 11 17:57:11 2020 +++ pkgsrc/regress/infra-unittests/subst.sh Thu Jun 11 18:04:41 2020 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: subst.sh,v 1.47 2020/06/11 17:57:11 rillig Exp $ +# $NetBSD: subst.sh,v 1.48 2020/06/11 18:04:41 rillig Exp $ # # Tests for mk/subst.mk. # @@ -1388,10 +1388,8 @@ if test_case_begin 'identity substitutio assert_that "$tmpdir/output" --file-is-lines \ '=> Substituting "id" in file' - # demonstrate PR pkg/55364 - # FIXME: negate - if [ ! -f "file.subst.sav" ]; then - assert_fail 'FIXME: temporary file still exists\n' + if [ -f "file.subst.sav" ]; then + assert_fail 'temporary file still exists\n' fi test_case_end --_----------=_1591898681246060--