git: 7b05f19e9708 - releng/12.4 - release: fix on-disc pkg binary symbolic links

From: Glen Barber <gjb_at_FreeBSD.org>
Date: Tue, 15 Nov 2022 19:30:47 UTC
The branch releng/12.4 has been updated by gjb:

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

commit 7b05f19e97087b2630e1142b13edef57f0540076
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:21:49 +0000

    release: fix on-disc pkg binary symbolic links
    
    Note: As this change was tested during the 13.1 cycle, but never
    merged back to stable/12, this change does not warrant an RC3.
    
    Approved by:    re (cperciva)
    PR:             263574
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit 68b0a79b7c7ab75597e2511f880238fbf8cfad32)
    (cherry picked from commit f398c2d8323c8d8fde80fdb89c6c858b9996c22f)
---
 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}