git: d3c788feec4c - main - Makefile.inc1: Don't unnecessarily ignore rm errors
Date: Fri, 09 Oct 2026 15:10:16 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=d3c788feec4cbe0854dc6f72e2166c0423a7c118
commit d3c788feec4cbe0854dc6f72e2166c0423a7c118
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-08-19 16:03:13 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-10-09 15:06:46 +0000
Makefile.inc1: Don't unnecessarily ignore rm errors
For rm -f it's not an error if the files do not exist. If there's any
other error it's presumably a real issue, so avoid ignoring all errors.
Reviewed by: brooks, adrian
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56714
---
Makefile.inc1 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.inc1 b/Makefile.inc1
index 6a228a29ed5d..7251deb11bdd 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2119,7 +2119,7 @@ update-packages: .PHONY
package-pkg: _pkgbootstrap _repodir .PHONY
.if defined(INCLUDE_PKG_IN_PKGBASE_REPO)
.if exists(${PORTSDIR})
- rm -rf /tmp/ports.${TARGET} || :
+ rm -rf /tmp/ports.${TARGET}
env ${WMAKEENV} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \
PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} \
WSTAGEDIR=${WSTAGEDIR} \
@@ -2215,7 +2215,7 @@ create-packages-source: _pkgbootstrap _repodir .PHONY
create-packages: .PHONY create-packages-world create-packages-kernel create-packages-source package-pkg create-packages-sets
create-source-src-package: _pkgbootstrap .PHONY
- rm -f ${SSTAGEDIR}/src.plist 2>/dev/null || :
+ rm -f ${SSTAGEDIR}/src.plist
.if !empty(GIT_CMD) && exists(${GIT_CMD}) && exists(${SRCDIR}/.git)
@cd ${SRCDIR}; \
( echo "@override_prefix /usr/src" ; \
@@ -2241,7 +2241,7 @@ create-source-src-package: _pkgbootstrap .PHONY
.endif
create-source-src-sys-package: _pkgbootstrap .PHONY
- rm -f ${SSTAGEDIR}/src-sys.plist 2>/dev/null || :
+ rm -f ${SSTAGEDIR}/src-sys.plist
.if !empty(GIT_CMD) && exists(${GIT_CMD}) && exists(${SRCDIR}/.git)
@cd ${SRCDIR}; \
( echo "@override_prefix /usr/src" ; \
@@ -2269,7 +2269,7 @@ create-source-src-sys-package: _pkgbootstrap .PHONY
create-source-packages: .PHONY _pkgbootstrap create-source-src-package create-source-src-sys-package
create-world-packages: _pkgbootstrap .PHONY
- @rm -f ${WSTAGEDIR}/*.plist 2>/dev/null || :
+ @rm -f ${WSTAGEDIR}/*.plist
@cd ${WSTAGEDIR} ; \
${METALOG_SORT_CMD} ${WSTAGEDIR}/${DISTDIR}/METALOG | \
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk