git: f398c2d8323c - stable/12 - release: fix on-disc pkg binary symbolic links

From: Glen Barber <gjb_at_FreeBSD.org>
Date: Tue, 15 Nov 2022 19:06:16 UTC
The branch stable/12 has been updated by gjb:

URL: https://cgit.FreeBSD.org/src/commit/?id=f398c2d8323c8d8fde80fdb89c6c858b9996c22f

commit f398c2d8323c8d8fde80fdb89c6c858b9996c22f
Author:     Glen Barber <gjb@FreeBSD.org>
AuthorDate: 2022-04-26 19:52:40 +0000
Commit:     Glen Barber <gjb@FreeBSD.org>
CommitDate: 2022-11-15 19:06:02 +0000

    release: fix on-disc pkg binary symbolic links
    
    PR:             263574
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit 68b0a79b7c7ab75597e2511f880238fbf8cfad32)
---
 release/scripts/pkg-stage.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh
index 6dd9f2b62f27..f1bb19636f75 100755
--- a/release/scripts/pkg-stage.sh
+++ b/release/scripts/pkg-stage.sh
@@ -86,7 +86,9 @@ ${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES}
 # using the on-disc packages.
 mkdir -p ${PKG_REPODIR}/Latest
 (cd ${PKG_REPODIR}/Latest && \
-	ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).txz pkg.txz)
+	ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).pkg pkg.pkg)
+(cd ${PKG_REPODIR}/Latest && \
+	rm -f pkg.txz && ln -s pkg.pkg pkg.txz)
 
 ${PKGCMD} repo ${PKG_REPODIR}