git: 27c537bf05d2 - releng/13.1 - release: fix on-disc pkg binary symbolic links

From: Glen Barber <gjb_at_FreeBSD.org>
Date: Tue, 26 Apr 2022 20:01:16 UTC
The branch releng/13.1 has been updated by gjb:

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

commit 27c537bf05d242643df7483052eb737885aa4db2
Author:     Glen Barber <gjb@FreeBSD.org>
AuthorDate: 2022-04-26 19:52:40 +0000
Commit:     Glen Barber <gjb@FreeBSD.org>
CommitDate: 2022-04-26 20:01:01 +0000

    release: fix on-disc pkg binary symbolic links
    
    Approved by:    re (kib)
    PR:             263574
    Reported by:    loader
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit 68b0a79b7c7ab75597e2511f880238fbf8cfad32)
    (cherry picked from commit fab1a7b9b6210257c5c048cdf754ca201fae7669)
---
 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}