git: 09a53a56b7a6 - releng/15.1 - Make "make update-packages" idempotent
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 14 May 2026 19:05:13 UTC
The branch releng/15.1 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=09a53a56b7a6892935509e2cda1954fff8078c3f
commit 09a53a56b7a6892935509e2cda1954fff8078c3f
Author: Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2026-05-07 18:18:29 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2026-05-14 19:04:52 +0000
Make "make update-packages" idempotent
If the user runs "make update-packages" without bumping BRANCH, then it
isn't possible to copy packages from the old location to the new one
(because the two locations are the same). So just skip that step.
Approved by: re (cperciva)
Sponsored by: ConnectWise
PR: 295085
Reviewed by: ivy, emaste
Differential Revision: https://reviews.freebsd.org/D56872
(cherry picked from commit bd1e789b8452a8c2f166a3b4defb95330c71dadd)
(cherry picked from commit 89a0148521aefe0a190d4b62749186c705962d32)
---
Makefile.inc1 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile.inc1 b/Makefile.inc1
index 2255b61a30ff..2c79a8c7920a 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2116,7 +2116,7 @@ real-packages: stage-packages create-packages sign-packages .PHONY
real-update-packages: stage-packages .PHONY
${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} create-packages
-.if defined(PKG_VERSION_FROM_DIR)
+.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/') ; \
@@ -2134,6 +2134,8 @@ real-update-packages: stage-packages .PHONY
echo "==> New package $${newpkgname}" ; \
fi ; \
done
+.elif defined(PKG_VERSION_FROM_DIR)
+ @echo "==> Package version ${PKG_VERSION} unchanged, keeping old package set"
.else
@echo "==> Bootstrapping repository, not checking for new packages"
.endif