git: 1e8db1f74e42 - stable/14 - pkgbase: don't remove the 'latest' symlink until the repo is final
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 31 Oct 2024 16:22:05 UTC
The branch stable/14 has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=1e8db1f74e4230e13cd0c85b21745f4a70e2aef9
commit 1e8db1f74e4230e13cd0c85b21745f4a70e2aef9
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2024-10-29 20:50:49 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2024-10-31 16:21:58 +0000
pkgbase: don't remove the 'latest' symlink until the repo is final
We can encounter many issues in the pkg-repo(8) process which would
currently leave us with no more 'latest' symlink in the repository. The
main problems with this are that we've now broken a subsequent
`update-packages` because we can't determine a PKG_VERSION_FROM, but
also we break configured clients that are still expecting to see *some*
repository.
Switch to just replacing the `latest` symlink entirely after we have
made it past the pkg-repo(8) step so that we only swap over when we have
a finished repository.
Reviewed by: bapt, emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D47303
(cherry picked from commit 8549e3ce0cd6d4a6187b3977d53ff56ce0ac9c5b)
---
Makefile.inc1 | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Makefile.inc1 b/Makefile.inc1
index 605b8098b742..1927a69ef732 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2280,14 +2280,13 @@ real-sign-packages: _pkgbootstrap .PHONY
.if ${PKG_BIN_VERSION} < 11700
printf "packing_format = \"${PKG_FORMAT}\";\n" >> ${WSTAGEDIR}/meta
.endif
- @[ -L "${REPODIR}/${PKG_ABI}/latest" ] && unlink ${REPODIR}/${PKG_ABI}/latest; \
- ${PKG_CMD} -o ABI=${PKG_ABI} repo -o OSVERSION="${SRCRELDATE}" \
+ @${PKG_CMD} -o ABI=${PKG_ABI} repo -o OSVERSION="${SRCRELDATE}" \
-m ${WSTAGEDIR}/meta \
-o ${REPODIR}/${PKG_ABI}/${PKG_VERSION} \
${REPODIR}/${PKG_ABI}/${PKG_VERSION} \
${PKG_REPO_SIGNING_KEY} ; \
cd ${REPODIR}/${PKG_ABI}; \
- ln -s ${PKG_OUTPUT_DIR} latest
+ ln -hfs ${PKG_OUTPUT_DIR} latest
#
#