Date: Mon, 22 May 2017 14:21:45 +0000 (UTC) From: Glen Barber <gjb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318646 - in head/release: . scripts Message-ID: <201705221421.v4MELj1f040835@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gjb Date: Mon May 22 14:21:45 2017 New Revision: 318646 URL: https://svnweb.freebsd.org/changeset/base/318646 Log: Allow PORTSDIR to be overridden in the pkg-stage target. Submitted by: Johannes Jost Meixner (original) PR: 218393 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile head/release/scripts/pkg-stage.sh Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Mon May 22 14:21:07 2017 (r318645) +++ head/release/Makefile Mon May 22 14:21:45 2017 (r318646) @@ -270,7 +270,7 @@ packagesystem: base.txz kernel.txz ${EXT 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 \ Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Mon May 22 14:21:07 2017 (r318645) +++ head/release/scripts/pkg-stage.sh Mon May 22 14:21:45 2017 (r318646) @@ -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}"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705221421.v4MELj1f040835>