git: d2ce6ed7f553 - stable/15 - Makefile.inc1: Always use ${PKG_CMD}
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 Jul 2026 13:07:57 UTC
The branch stable/15 has been updated by ivy:
URL: https://cgit.FreeBSD.org/src/commit/?id=d2ce6ed7f553164f4f504b1a46cf06336c525674
commit d2ce6ed7f553164f4f504b1a46cf06336c525674
Author: Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2026-04-27 21:29:43 +0000
Commit: Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2026-07-25 13:01:23 +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
(cherry picked from commit b866d05ea2860f9ccc27c75ff0501372896b5bf2)
---
Makefile.inc1 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.inc1 b/Makefile.inc1
index 09c986d4a985..b2f491ff254b 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2057,7 +2057,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
@@ -2119,13 +2119,13 @@ real-update-packages: stage-packages .PHONY
.if defined(PKG_VERSION_FROM_DIR) && ${PKG_VERSION} != ${PKG_VERSION_FROM}
@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} ; \