Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Apr 2021 16:45:04 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b0df36580d5b - main - etcupdate: Remove the old pre-world tree when rotating for -p.
Message-ID:  <202104231645.13NGj414056227@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=b0df36580d5b0df67a0f58ded8f6356b268f7f71

commit b0df36580d5b0df67a0f58ded8f6356b268f7f71
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-04-23 16:40:04 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2021-04-23 16:44:18 +0000

    etcupdate: Remove the old pre-world tree when rotating for -p.
    
    This fixes a bug in an earlier change to move tree rotation to
    the end of the update where the step to make room for the new
    preworld tree was deleting the old "current" tree instead of
    the old "preworld" tree.
    
    Reported by:    olivier, dhw
    Fixes:          0611aec3cf3a373e6a06f103699dbc91c3d6d472
    MFC after:      2 weeks
---
 usr.sbin/etcupdate/etcupdate.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh
index bb9eb00bc646..254a72abae08 100755
--- a/usr.sbin/etcupdate/etcupdate.sh
+++ b/usr.sbin/etcupdate/etcupdate.sh
@@ -1644,7 +1644,7 @@ EOF
 			if [ -z "$preworld" ]; then
 				panic "New tree should be rotated to old"
 			fi
-			if ! remove_tree $old; then
+			if ! remove_tree $new; then
 				echo "Unable to remove previous pre-world tree."
 				exit 1
 			fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104231645.13NGj414056227>