diff options
author | jlam <jlam> | 2002-09-26 21:04:11 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-09-26 21:04:11 +0000 |
commit | e199496dbe7eb911a68cf10ba519cc11fbedaf45 (patch) | |
tree | 34fba5da01faeff89a2e2720ab9fa6205fda644a | |
parent | 6855479d65d3079555328fb4ad969f01d8c1ae70 (diff) | |
download | pkgsrc-e199496dbe7eb911a68cf10ba519cc11fbedaf45.tar.gz |
When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Use
_PKG_DEBUG_SCRIPT when running the INSTALL/DEINSTALL scripts so that they
may be easier to debug.
-rw-r--r-- | mk/bsd.pkg.install.mk | 10 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 8 |
2 files changed, 12 insertions, 6 deletions
diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk index 460f14b31d8..a0702cdf94e 100644 --- a/mk/bsd.pkg.install.mk +++ b/mk/bsd.pkg.install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.install.mk,v 1.29 2002/09/26 09:59:09 jlam Exp $ +# $NetBSD: bsd.pkg.install.mk,v 1.30 2002/09/26 21:04:11 jlam Exp $ # # This Makefile fragment is included by package Makefiles to use the common # INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply: @@ -234,11 +234,15 @@ FILES_SUBST+= USERADD=${USERADD:Q} FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} +INSTALL_SCRIPTS_ENV= PKG_PREFIX=${PREFIX} + pre-install-script: generate-install-scripts - PKG_PREFIX=${PREFIX} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL + ${_PKG_SILENT}${_PKG_DEBUG}${SETENV} ${INSTALL_SCRIPTS_ENV} \ + ${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL post-install-script: install-rcd-scripts - PKG_PREFIX=${PREFIX} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL + ${_PKG_SILENT}${_PKG_DEBUG}${SETENV} ${INSTALL_SCRIPTS_ENV} \ + ${_PKG_DEBUG_SCRIPT} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL generate-install-scripts: ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${DEINSTALL_SRC} | \ diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index dc1dbec8f39..1f0c0836868 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1057 2002/09/26 09:57:50 abs Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1058 2002/09/26 21:04:11 jlam Exp $ # # This file is in the public domain. # @@ -480,14 +480,16 @@ MTREE_ARGS?= -U -f ${MTREE_FILE} -d -e -p # 2 == shell "set -x" operation PKG_DEBUG_LEVEL?= 0 _PKG_SILENT= @ -_PKG_DEBUG= +_PKG_DEBUG= # empty +_PKG_DEBUG_SCRIPT= # empty .if ${PKG_DEBUG_LEVEL} > 0 -_PKG_SILENT= +_PKG_SILENT= # empty .endif .if ${PKG_DEBUG_LEVEL} > 1 _PKG_DEBUG= set -x; +_PKG_DEBUG_SCRIPT= ${SH} -x .endif # If WRKOBJDIR is set, use that tree to build |