git: 55736146389f - main - check/delete-old: Fix /bin/rmail removal condition

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Thu, 21 Jul 2022 22:22:47 UTC
The branch main has been updated by dchagin:

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

commit 55736146389f997fe3e2453f1d48d96ff1ad5b7a
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2022-07-21 22:20:25 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-07-21 22:20:25 +0000

    check/delete-old: Fix /bin/rmail removal condition
    
    When WITHOUT_SENDMAIL is enabled and WITHOUT_MAILWRAPPER is disabled
    we install /bin/rmail as a link to the /usr/sbin/mailwrapper.
    Ensure make delete-old does not unlink /bin/rmail in that case.
    
    Reviewed by:            emaste
    Differential Revision:  https://reviews.freebsd.org/D35874
    MFC after:              2 weeks
---
 tools/build/mk/OptionalObsoleteFiles.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 7f67b0c8056d..1b26bfa7473d 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -7673,7 +7673,9 @@ OLD_FILES+=etc/periodic/daily/440.status-mailq
 OLD_FILES+=etc/periodic/daily/460.status-mail-rejects
 OLD_FILES+=etc/periodic/daily/500.queuerun
 OLD_FILES+=etc/rc.d/sendmail
+.if ${MK_MAILWRAPPER} == no
 OLD_FILES+=bin/rmail
+.endif
 OLD_FILES+=usr/bin/vacation
 OLD_FILES+=usr/include/libmilter/mfapi.h
 OLD_FILES+=usr/include/libmilter/mfdef.h