git: 1203e7b1f05b - main - release: Use pkg install -f
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 14 May 2025 12:54:37 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=1203e7b1f05b49d95bf44801ddc1ab7e6a9eeb97
commit 1203e7b1f05b49d95bf44801ddc1ab7e6a9eeb97
Author: Isaac Freund <ifreund@freebsdfoundation.org>
AuthorDate: 2025-05-11 02:48:46 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-05-14 12:24:45 +0000
release: Use pkg install -f
Without -f, pkg will not write to the METALOG file if the packages
are already installed from a previous build, causing the packages to
not be included in the final install media.
Official builds start with a clean target directory and won't encounter
an issue, but this change supports iteration in development of the
release targets.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50344
---
release/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/release/Makefile b/release/Makefile
index 72df23bfa52b..1a64c51d3400 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -76,7 +76,9 @@ PKG_ENV+= INSTALL_AS_USER=yes
PKG_ENV+= ASSUME_ALWAYS_YES=yes
PKG_ARGS+= -o METALOG=METALOG
PKG_ARGS+= -r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos
-PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install
+# Pass -f to make sure pkg writes to the METALOG even if the package
+# is already installed from a previous build
+PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install -f
PKG_CLEAN= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} clean -a
.endif