mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
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. Sponsored by: ConnectWise PR: 295085 MFC after: 1 week Reviewed by: ivy, emaste Differential Revision: https://reviews.freebsd.org/D56872
This commit is contained in:
+3
-1
@@ -2128,7 +2128,7 @@ real-packages: stage-packages create-packages sign-packages .PHONY
|
|||||||
|
|
||||||
real-update-packages: stage-packages .PHONY
|
real-update-packages: stage-packages .PHONY
|
||||||
${_+_}${MAKE} -C ${.CURDIR} PKG_VERSION=${PKG_VERSION} create-packages
|
${_+_}${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})"
|
@echo "==> Checking for new packages (comparing ${PKG_VERSION} to ${PKG_VERSION_FROM})"
|
||||||
@for pkg in ${PKG_VERSION_FROM_DIR}/${PKG_NAME_PREFIX}-*; do \
|
@for pkg in ${PKG_VERSION_FROM_DIR}/${PKG_NAME_PREFIX}-*; do \
|
||||||
pkgname=$$(${PKG_CMD} query -F $${pkg} '%n' | sed 's/${PKG_NAME_PREFIX}-\(.*\)/\1/') ; \
|
pkgname=$$(${PKG_CMD} query -F $${pkg} '%n' | sed 's/${PKG_NAME_PREFIX}-\(.*\)/\1/') ; \
|
||||||
@@ -2146,6 +2146,8 @@ real-update-packages: stage-packages .PHONY
|
|||||||
echo "==> New package $${newpkgname}" ; \
|
echo "==> New package $${newpkgname}" ; \
|
||||||
fi ; \
|
fi ; \
|
||||||
done
|
done
|
||||||
|
.elif defined(PKG_VERSION_FROM_DIR)
|
||||||
|
@echo "==> Package version ${PKG_VERSION} unchanged, keeping old package set"
|
||||||
.else
|
.else
|
||||||
@echo "==> Bootstrapping repository, not checking for new packages"
|
@echo "==> Bootstrapping repository, not checking for new packages"
|
||||||
.endif
|
.endif
|
||||||
|
|||||||
Reference in New Issue
Block a user