From nobody Wed May 25 21:03:02 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3BE101B5487B; Wed, 25 May 2022 21:03:03 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L7k6v1HKDz3q40; Wed, 25 May 2022 21:03:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653512583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71AgEOYidGC5EdyiAWjXgFiPFTXzhsIW0QU9uFC1lDw=; b=to4KAivHNDusf7YgxQ9hANHBEN5vQ72fpeIvxdrr9r1W2/PGOQVUrFFcEmMvADHkwTFv79 pCjrs1yNGxFj2uUf76Sg1uB5uRypR+LdhdcSN9GCWHoeegW3Iypwq5L/j9pItWQAfELOt7 I/wREF4CusSSYrw9GZUhyUogHWP8mJIfBV/pvfcFegqKm/kn9okjMNuUQB98JgTnN3kHoQ Y2maEpbMnICPisxCPpFci3mzZW4NMY2tUvQCcUSgC6UZmyzZNZ4Jsbo3LWSRw5cHJVQoau XAu9uwK6lJ0IijnpBdDcNpJwUMJxV58NAwZYGFTCR/rR/odYdLY2SRBZEHmrcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0329420B12; Wed, 25 May 2022 21:03:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24PL32bU091206; Wed, 25 May 2022 21:03:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24PL32Wi091205; Wed, 25 May 2022 21:03:02 GMT (envelope-from git) Date: Wed, 25 May 2022 21:03:02 GMT Message-Id: <202205252103.24PL32Wi091205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 431944fb5fff - main - etcupdate: Don't rotate trees for a dry run. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 431944fb5ffff5ad56e720b75b7beecdc4878e0e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653512583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71AgEOYidGC5EdyiAWjXgFiPFTXzhsIW0QU9uFC1lDw=; b=WZzgF5Xn7PRRKPrZZE+7JsCRDZigTjJbYEzYdELMbewdEEIyKD/aoZZ80Y1PaMLQ5GGIZF kjKZLQLtXJsACHtU+fNUUwlVaowL8guyYCLd+Vx7pBYosCykG41jKubfLOkMxBSff6ElFs RfH/Lrs3NRebEI+4PamicifAH9F7CvoaOjzePrVwKITd8m2YzhoMjbJQ81b695LfPXeFxl xpYq8+iU09+MBz8tiote/J4MoL65wEiqj4Z6aZouWRfVeVa1Y/1OumtpM7686eLBYpADoC 0GLL2k352IsVm6JptbF9BR6O24mrXQ3Agyuwu3aUwd4LWJcBRle77P8ihMaNuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653512583; a=rsa-sha256; cv=none; b=md39j4Y0VgkCBpvMGhm4HFo48SHmPt3xkYbssD5ZmAqe3Y6Hbg85ta16E4BjlyMmfIoTz2 GyVKCIqYqtnHQAF0RSc2AmFpct6sSqpNOHjPGrxk7T+HqPikAwamRB4Xzkn9A3qtV/E60d hABKmU3vVDDUtH2Yyz5Q5TADWeWAmjNYBnCPDi02IERrNGWeDtOS6cw4Ag0hLleMH2j1o5 4dLycqTOSiQr6MOlyUzE5flH7OIfrl0+uuHPXWwzpJRrncSLfiJqLJ2rso4QK2IwWZBvCy 4jN1zVTaa2HFs/eWx3WClbc9WfbivaeSLLMSAeTCoikFEII9jJI2AUEoZKpvUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=431944fb5ffff5ad56e720b75b7beecdc4878e0e commit 431944fb5ffff5ad56e720b75b7beecdc4878e0e Author: John Baldwin AuthorDate: 2022-05-25 21:02:51 +0000 Commit: John Baldwin CommitDate: 2022-05-25 21:02:51 +0000 etcupdate: Don't rotate trees for a dry run. When performing a dry run, remove the temporary tree created rather than rotating the trees. Rotating the trees meant that etcupdate thought the latest changes were already merged and would not merge them on the next real run. PR: 260281 Reported by: Tomoaki AOKI Fixes: 0611aec3cf3a etcupdate: Always extract to a temporary tree. MFC after: 1 week --- usr.sbin/etcupdate/etcupdate.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 40868fe6586e..1618fab59fe6 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -1612,6 +1612,18 @@ EOF cat $WARNINGS fi + # If this was a dryrun, remove the temporary tree if we built + # a new one. + if [ -n "$dryrun" ]; then + if [ -n "$dir" ]; then + if [ -n "$rerun" ]; then + panic "Should not have a temporary directory" + fi + remove_tree $dir + fi + return + fi + # Finally, rotate any needed trees. if [ "$new" != "$NEWTREE" ]; then if [ -n "$rerun" ]; then