diff options
author | gjb <gjb@FreeBSD.org> | 2017-05-25 01:45:43 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2017-05-25 01:45:43 +0000 |
commit | 77ca4edc8bf2f67807d1e61c9e8a33e7ede9bdef (patch) | |
tree | 6304d8e5c8efff86d502c2842b3d0d3961b68911 /release | |
parent | 26b1a1b9adbfecccd39266f2b488dc972f8443df (diff) | |
download | FreeBSD-src-77ca4edc8bf2f67807d1e61c9e8a33e7ede9bdef.zip FreeBSD-src-77ca4edc8bf2f67807d1e61c9e8a33e7ede9bdef.tar.gz |
MFC r318646:
Allow PORTSDIR to be overridden in the pkg-stage target.
PR: 218393
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release')
-rw-r--r-- | release/Makefile | 2 | ||||
-rwxr-xr-x | release/scripts/pkg-stage.sh | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/release/Makefile b/release/Makefile index b1dfa82..6c2818a 100644 --- a/release/Makefile +++ b/release/Makefile @@ -266,7 +266,7 @@ packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} pkg-stage: .if !defined(NOPKG) - env REPOS_DIR=${.CURDIR}/pkg_repos/ \ + env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ sh ${.CURDIR}/scripts/pkg-stage.sh mkdir -p ${.OBJDIR}/dvd/packages/repos/ cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index dd26e4b..fe4ffd9 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -10,6 +10,7 @@ export PKG_DBDIR="/tmp/pkg" export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export PKGCMD="/usr/sbin/pkg -d" +export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES="archivers/unzip devel/subversion @@ -33,8 +34,8 @@ x11/kde4 x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). -if [ ! -f /usr/ports/Makefile ]; then - echo "*** /usr/ports is missing! ***" +if [ ! -f ${PORTSDIR}/Makefile ]; then + echo "*** ${PORTSDIR} is missing! ***" echo "*** Skipping pkg-stage.sh ***" echo "*** Unset NOPORTS to fix this ***" exit 0 @@ -42,7 +43,7 @@ fi if [ ! -x /usr/local/sbin/pkg ]; then /etc/rc.d/ldconfig restart - /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean + /usr/bin/make -C ${PORTSDIR}/ports-mgmt/pkg install clean fi export DVD_DIR="dvd/packages" @@ -58,7 +59,7 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "/usr/ports/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else echo "*** Skipping nonexistent port: ${_P}" |