Date: Fri, 20 May 2016 19:01:59 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r415573 - head/Mk/Scripts Message-ID: <201605201901.u4KJ1xUK015200@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Fri May 20 19:01:59 2016 New Revision: 415573 URL: https://svnweb.freebsd.org/changeset/ports/415573 Log: Ease debugging of Mk/Scripts scripts. Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D6474 Modified: head/Mk/Scripts/actual-package-depends.sh head/Mk/Scripts/check-stagedir.sh head/Mk/Scripts/check_leftovers.sh head/Mk/Scripts/depends-list.sh head/Mk/Scripts/dialog4ports.sh head/Mk/Scripts/do-depends.sh head/Mk/Scripts/do-users-groups.sh head/Mk/Scripts/find-lib.sh head/Mk/Scripts/qa.sh head/Mk/Scripts/smart_makepatch.sh Modified: head/Mk/Scripts/actual-package-depends.sh ============================================================================== --- head/Mk/Scripts/actual-package-depends.sh Fri May 20 18:56:16 2016 (r415572) +++ head/Mk/Scripts/actual-package-depends.sh Fri May 20 19:01:59 2016 (r415573) @@ -2,6 +2,8 @@ # MAINTAINER: portmgr@FeeeBSD.org # $FreeBSD$ +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_ACTUAL_PACKAGE_DEPENDS}" ] && set -x + if [ -z "${PKG_BIN}" ]; then echo "PKG_BIN required in environment." >&2 exit 1 Modified: head/Mk/Scripts/check-stagedir.sh ============================================================================== --- head/Mk/Scripts/check-stagedir.sh Fri May 20 18:56:16 2016 (r415572) +++ head/Mk/Scripts/check-stagedir.sh Fri May 20 19:01:59 2016 (r415573) @@ -229,6 +229,8 @@ esac validate_env STAGEDIR PREFIX LOCALBASE WRKDIR WRKSRC MTREE_FILE \ TMPPLIST PLIST_SUB_SED SCRIPTSDIR PORT_OPTIONS NO_PREFIX_RMDIR +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_STAGEDIR}" ] && set -x + set -u if [ $makeplist = 0 ] ; then Modified: head/Mk/Scripts/check_leftovers.sh ============================================================================== --- head/Mk/Scripts/check_leftovers.sh Fri May 20 18:56:16 2016 (r415572) +++ head/Mk/Scripts/check_leftovers.sh Fri May 20 19:01:59 2016 (r415573) @@ -23,6 +23,8 @@ # The PLIST_SUB feature can be disabled by setting PLIST_SUB_SED= # in environment. +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_LEFTOVERS}" ] && set -x + origin="$1" [ $# -eq 1 ] || { echo "Must supply ORIGIN as parameter" >&2; exit 1; } [ -n "${PORTSDIR}" ] || { echo "PORTSDIR must be set" >&2; exit 1; } Modified: head/Mk/Scripts/depends-list.sh ============================================================================== --- head/Mk/Scripts/depends-list.sh Fri May 20 18:56:16 2016 (r415572) +++ head/Mk/Scripts/depends-list.sh Fri May 20 19:01:59 2016 (r415573) @@ -34,6 +34,8 @@ if [ ${recursive} -eq 1 -o ${requires_wr MAKE="${dp_MAKE}" export_ports_env >/dev/null fi +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DEPENDS_LIST}" ] && set -x + set -u check_dep() { Modified: head/Mk/Scripts/dialog4ports.sh ============================================================================== --- head/Mk/Scripts/dialog4ports.sh Fri May 20 18:56:16 2016 (r415572) +++ head/Mk/Scripts/dialog4ports.sh Fri May 20 19:01:59 2016 (r415573) @@ -3,6 +3,8 @@ # Maintainer: portmgr@FreeBSD.org set -e +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DIALOG4PORTS}" ] && set -x + if [ -z "${DIALOG4PORTS}" -o -z "${PORTSDIR}" -o -z "${MAKE}" ]; then echo "DIALOG4PORTS, MAKE and PORTSDIR required in environment." >&2 exit 1 Modified: head/Mk/Scripts/do-depends.sh ============================================================================== --- head/Mk/Scripts/do-depends.sh Fri May 20 18:56:16 2016 (r415572) +++ head/Mk/Scripts/do-depends.sh Fri May 20 19:01:59 2016 (r415573) @@ -13,6 +13,8 @@ validate_env dp_RAWDEPENDS dp_DEPTYPE dp dp_PKGNAME dp_STRICT_DEPENDS dp_LOCALBASE dp_LIB_DIRS dp_SH \ dp_SCRIPTSDIR PORTSDIR dp_MAKE +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_DEPENDS}" ] && set -x + set -u install_depends() Modified: head/Mk/Scripts/do-users-groups.sh ============================================================================== --- head/Mk/Scripts/do-users-groups.sh Fri May 20 18:56:16 2016 (r415572) +++ head/Mk/Scripts/do-users-groups.sh Fri May 20 19:01:59 2016 (r415573) @@ -12,6 +12,8 @@ validate_env dp_ECHO_MSG dp_GID_FILES dp dp_UG_DEINSTALL dp_UG_INSTALL dp_UID_FILES dp_UID_OFFSET \ dp_USERS_BLACKLIST +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_USERS_GROUPS}" ] && set -x + set -u USERS=$1 Modified: head/Mk/Scripts/find-lib.sh ============================================================================== --- head/Mk/Scripts/find-lib.sh Fri May 20 18:56:16 2016 (r415572) +++ head/Mk/Scripts/find-lib.sh Fri May 20 19:01:59 2016 (r415573) @@ -2,6 +2,8 @@ # MAINTAINER: portmgr@FreeBSD.org # $FreeBSD$ +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_FIND_LIB}" ] && set -x + if [ -z "${LIB_DIRS}" -o -z "${LOCALBASE}" ]; then echo "LIB_DIRS, LOCALBASE required in environment." >&2 exit 1 Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Fri May 20 18:56:16 2016 (r415572) +++ head/Mk/Scripts/qa.sh Fri May 20 19:01:59 2016 (r415573) @@ -7,6 +7,8 @@ if [ -z "${STAGEDIR}" -o -z "${PREFIX}" exit 1 fi +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_QA}" ] && set -x + LF=$(printf '\nX') LF=${LF%X} Modified: head/Mk/Scripts/smart_makepatch.sh ============================================================================== --- head/Mk/Scripts/smart_makepatch.sh Fri May 20 18:56:16 2016 (r415572) +++ head/Mk/Scripts/smart_makepatch.sh Fri May 20 19:01:59 2016 (r415573) @@ -25,6 +25,7 @@ # if those targets modify source files (e.g. with sed). You may also # want to disable EXTRA_PATCHES as well if that is being used. +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_SMART_MAKEPATCH}" ] && set -x if [ -z "${PATCHDIR}" -o -z "${PATCH_WRKSRC}" -o -z "${WRKDIR}" ]; then echo "WRKDIR, PATCHDIR, and PATCH_WRKSRC required in environment." >&2
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605201901.u4KJ1xUK015200>