git: 6109c35c328c - stable/15 - Don't some prune empty dirs created by BSD.tests.dist
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 23 Nov 2026 02:07:52 UTC
The branch stable/15 has been updated by ngie:
URL: https://cgit.FreeBSD.org/src/commit/?id=6109c35c328c07082fa4d63cba5503535c3bd579
commit 6109c35c328c07082fa4d63cba5503535c3bd579
Author: Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-04 18:53:01 +0000
Commit: Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:07:25 +0000
Don't some prune empty dirs created by BSD.tests.dist
Before this change, directories needed when MK_DTRACE_TESTS != no and
MK_ZFS_TESTS != no but not MK_TESTS != no, were being created via
`BSD.tests.dist` as part of the standard build/install process with the
top-level `hierarchy` target. This behavior resulted in `make check-old`
flagging a lot of issues after 30c20ca26e105c, even after `make
delete-old` was run and the directories were removed.
Remove the logic which pruned these empty directories; this "fixes" the
issue with `make check-old`, et al and allows a proper technical solution to
`OptionalObsoleteFiles.inc` to be implemented by pkgbase in an unimpeded
manner without introducing additional complexity.
See the review for more details.
PR: 299650
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D60928
(cherry picked from commit 0df8ed538c620cf021f8dfa2c54892b5ef9620a5)
---
tools/build/mk/OptionalObsoleteFiles.inc | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 3b1e09f94b1d..931affb4a67f 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1445,8 +1445,12 @@ OLD_FILES+=usr/share/man/man1/opt.1.gz
CDDL_TEST_DIRS= cddl
. for d in ${CDDL_TEST_DIRS}
. if exists(${DESTDIR}${TESTSBASE}/${d}/)
-TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
-OLD_DIRS+=${TESTS_DIRS}
+# Bug 299650: do not prune empty directories created by
+# `etc/mtree/BSD.tests.dist`.
+#
+# Read https://reviews.freebsd.org/D60928 for more details.
+#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+#OLD_DIRS+=${TESTS_DIRS}
TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
OLD_FILES+=${TESTS_FILES}
. endif
@@ -1741,8 +1745,12 @@ OLD_FILES+=${TESTS_FILES}
DTRACE_TEST_DIRS= cddl/usr.sbin/dtrace
. for d in ${DTRACE_TEST_DIRS}
. if exists(${DESTDIR}${TESTSBASE}/${d}/)
-TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
-OLD_DIRS+=${TESTS_DIRS}
+# Bug 299650: do not prune empty directories created by
+# `etc/mtree/BSD.tests.dist`.
+#
+# Read https://reviews.freebsd.org/D60928 for more details.
+#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+#OLD_DIRS+=${TESTS_DIRS}
TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
OLD_FILES+=${TESTS_FILES}
. endif
@@ -9502,8 +9510,12 @@ ZFS_TEST_DIRS= cddl/usr.bin/ztest
ZFS_TEST_DIRS+= cddl/usr.sbin/zfsd
. for d in ${ZFS_TEST_DIRS}
. if exists(${DESTDIR}${TESTSBASE}/${d}/)
-TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
-OLD_DIRS+=${TESTS_DIRS}
+# Bug 299650: do not prune empty directories created by
+# `etc/mtree/BSD.tests.dist`.
+#
+# Read https://reviews.freebsd.org/D60928 for more details.
+#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+#OLD_DIRS+=${TESTS_DIRS}
TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
OLD_FILES+=${TESTS_FILES}
. endif