From 84c387db230c17d690b18727f6a7e4994756a547 Mon Sep 17 00:00:00 2001 From: gjb Date: Tue, 6 Jan 2015 20:42:50 +0000 Subject: [PATCH] Update pkg-stage.sh to be compatible with pkg-1.4.x. In 1.3.x and earlier, ABI format is, for example, freebsd:11:x86:64. In 1.4.x, ABI format is FreeBSD:11:amd64, and a new configuration entry, ALTABI, is: freebsd:11:x86:64. Export PKG_ABI and PKG_ALTABI accordingly, and if PKG_ALTABI is set, create a symlink within the dvd PKG_CACHEDIR so both new and old ABI directories exist. MFC after: 3 days Sponsored by: The FreeBSD Foundation --- release/scripts/pkg-stage.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 0b9963284d60..2c2d6fefd37e 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -40,10 +40,15 @@ if [ ! -x /usr/local/sbin/pkg ]; then /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi +export DVD_DIR="dvd/packages" export PKG_ABI=$(pkg config ABI) -export PKG_REPODIR="dvd/packages/${PKG_ABI}" +export PKG_ALTABI=$(pkg config ALTABI 2>/dev/null) +export PKG_REPODIR="${DVD_DIR}/${PKG_ABI}" /bin/mkdir -p ${PKG_REPODIR} +if [ ! -z "${PKG_ALTABI}" ]; then + ln -s ${PKG_ABI} ${PKG_ALTABI} +fi # Print pkg(8) information to make debugging easier. ${PKGCMD} -vv