aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2025-05-05 18:01:21 +0000
committerEd Maste <emaste@FreeBSD.org>2026-04-27 19:47:24 +0000
commit4846afc9104a1b4aeec31dc7c324f69ad5ffab1b (patch)
treea5a9e13dbcd131df9f03b85dbef8f9505dc961e0
parentea27ec183d0ff26e1273202841a02041b6d93955 (diff)
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
-rwxr-xr-xrelease/scripts/pkg-stage.sh4
1 files 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}