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
This commit is contained in:
parent
5667872e2f
commit
8f85f8e66e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276765
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user