git: b866d05ea286 - main - Makefile.inc1: Always use ${PKG_CMD}
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Apr 2026 22:06:39 UTC
The branch main has been updated by ivy:
URL: https://cgit.FreeBSD.org/src/commit/?id=b866d05ea2860f9ccc27c75ff0501372896b5bf2
commit b866d05ea2860f9ccc27c75ff0501372896b5bf2
Author: Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2026-04-27 21:29:43 +0000
Commit: Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2026-04-27 21:29:43 +0000
Makefile.inc1: Always use ${PKG_CMD}
Previously we had a mix of ${PKG_CMD} and bare 'pkg', which is
wrong, and breaks the build when 'pkg' isn't in the tools path,
e.g. when cross-building.
MFC after: 2 weeks
Reviewed by: wosch, emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56655
---
Makefile.inc1 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.inc1 b/Makefile.inc1
index 9b8cc4234ae1..dcdc735aa645 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2062,7 +2062,7 @@ _pkgbootstrap: .PHONY
BATCH=1 WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles \
all install clean
.else
- @env ASSUME_ALWAYS_YES=YES pkg bootstrap
+ @env ASSUME_ALWAYS_YES=YES ${PKG_CMD} bootstrap
.endif
.endif
@@ -2124,13 +2124,13 @@ real-update-packages: stage-packages .PHONY
.if defined(PKG_VERSION_FROM_DIR)
@echo "==> Checking for new packages (comparing ${PKG_VERSION} to ${PKG_VERSION_FROM})"
@for pkg in ${PKG_VERSION_FROM_DIR}/${PKG_NAME_PREFIX}-*; do \
- pkgname=$$(pkg query -F $${pkg} '%n' | sed 's/${PKG_NAME_PREFIX}-\(.*\)/\1/') ; \
+ pkgname=$$(${PKG_CMD} query -F $${pkg} '%n' | sed 's/${PKG_NAME_PREFIX}-\(.*\)/\1/') ; \
newpkgname=${PKG_NAME_PREFIX}-$${pkgname}-${PKG_VERSION}.${PKG_EXT} ; \
- oldsum=$$(pkg query -F $${pkg} '%X') ; \
+ oldsum=$$(${PKG_CMD} query -F $${pkg} '%X') ; \
if [ ! -f ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} ]; then \
continue; \
fi ; \
- newsum=$$(pkg query -F ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} '%X') ; \
+ newsum=$$(${PKG_CMD} query -F ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} '%X') ; \
if [ "${BRANCH_EXT_FROM}" = "${BRANCH_EXT}" -a "$${oldsum}" = "$${newsum}" ]; then \
echo "==> Keeping old ${PKG_NAME_PREFIX}-$${pkgname}-${PKG_VERSION_FROM}.${PKG_EXT}" ; \
rm ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} ; \