git: 4846afc9104a - main - pkg-stage: Improve symlink creation
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Apr 2026 19:51:00 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=4846afc9104a1b4aeec31dc7c324f69ad5ffab1b
commit 4846afc9104a1b4aeec31dc7c324f69ad5ffab1b
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-05-05 18:01:21 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-04-27 19:47:24 +0000
pkg-stage: Improve symlink creation
Invoke ln with -n and -f. In normal use it doesn't matter, but during
development this might be run in a partially populated leftover tree.
Reviewed by: ivy
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52883
---
release/scripts/pkg-stage.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh
index 2f56cf794973..278f7422894d 100755
--- a/release/scripts/pkg-stage.sh
+++ b/release/scripts/pkg-stage.sh
@@ -76,7 +76,7 @@ export PKG_REPODIR="packages/${PKG_ABI}"
/bin/mkdir -p ${ROOTDIR}/${PKG_REPODIR}
if [ -n "${PKG_ALTABI}" ]; then
- ln -s ${PKG_ABI} ${ROOTDIR}/packages/${PKG_ALTABI}
+ ln -nfs ${PKG_ABI} ${ROOTDIR}/packages/${PKG_ALTABI}
fi
# Ensure the ports listed in _DVD_PACKAGES_* exist to sanitize the
@@ -115,7 +115,7 @@ ${PKGCMD} fetch -o ${PKG_REPODIR} -r release-kmods -d ${DVD_PACKAGES_KMODS}
# using the on-disc packages.
export LATEST_DIR="${ROOTDIR}/${PKG_REPODIR}/Latest"
mkdir -p ${LATEST_DIR}
-ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).pkg ${LATEST_DIR}/pkg.pkg
+ln -nfs ../All/$(${PKGCMD} rquery %n-%v pkg).pkg ${LATEST_DIR}/pkg.pkg
${PKGCMD} repo ${PKG_REPODIR}