pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Use PHASE_MSG, STEP_MSG, WARNING_MSG, and ERROR_MSG...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a2dda8bb5a53
branches: trunk
changeset: 513912:a2dda8bb5a53
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Jun 05 22:49:44 2006 +0000
description:
Use PHASE_MSG, STEP_MSG, WARNING_MSG, and ERROR_MSG in place of ECHO_MSG
in various places.
diffstat:
mk/bsd.pkg.clean.mk | 6 ++--
mk/bsd.pkg.extract.mk | 4 +-
mk/bsd.pkg.mk | 61 ++++++++++++++++++++--------------------
mk/bsd.pkg.patch.mk | 14 ++++----
mk/bsd.pkg.update.mk | 18 +++++------
mk/check/check-vulnerable.mk | 10 ++++--
mk/flavor/pkg/depends.mk | 12 ++++----
mk/flavor/pkg/install.mk | 4 +-
mk/flavor/pkg/metadata.mk | 4 +-
mk/flavor/pkg/package.mk | 8 ++--
mk/flavor/pkg/replace.mk | 4 +-
mk/flavor/pkg/views.mk | 6 ++--
mk/install/deinstall.mk | 4 +-
mk/install/install.mk | 26 ++++++++--------
mk/install/replace.mk | 6 ++--
mk/package/bsd.package.mk | 4 +-
mk/package/package.mk | 18 ++++++------
mk/pkginstall/bsd.pkginstall.mk | 6 ++--
18 files changed, 107 insertions(+), 108 deletions(-)
diffs (truncated from 711 to 300 lines):
diff -r eb7bdeee2485 -r a2dda8bb5a53 mk/bsd.pkg.clean.mk
--- a/mk/bsd.pkg.clean.mk Mon Jun 05 22:34:40 2006 +0000
+++ b/mk/bsd.pkg.clean.mk Mon Jun 05 22:49:44 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.clean.mk,v 1.3 2006/01/19 16:24:51 jlam Exp $
+# $NetBSD: bsd.pkg.clean.mk,v 1.4 2006/06/05 22:49:44 jlam Exp $
#
# This Makefile fragment is included to bsd.pkg.mk and defines the
# relevant variables and targets for the "clean" phase.
@@ -51,13 +51,13 @@
.PHONY: do-clean
.if !target(do-clean)
do-clean:
- @${ECHO_MSG} "${_PKGSRC_IN}> Cleaning for ${PKGNAME}"
+ @${PHASE_MSG} "Cleaning for ${PKGNAME}"
${_PKG_SILENT}${_PKG_DEBUG} \
if ${TEST} -d ${WRKDIR:Q}; then \
if ${TEST} -w ${WRKDIR:Q}; then \
${RM} -fr ${WRKDIR:Q}; \
else \
- ${ECHO_MSG} "${_PKGSRC_IN}> "${WRKDIR:Q}" not writable, skipping"; \
+ ${STEP_MSG} ${WRKDIR:Q}" not writable, skipping"; \
fi; \
fi
. if defined(WRKOBJDIR)
diff -r eb7bdeee2485 -r a2dda8bb5a53 mk/bsd.pkg.extract.mk
--- a/mk/bsd.pkg.extract.mk Mon Jun 05 22:34:40 2006 +0000
+++ b/mk/bsd.pkg.extract.mk Mon Jun 05 22:49:44 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.extract.mk,v 1.24 2006/06/04 04:31:47 jlam Exp $
+# $NetBSD: bsd.pkg.extract.mk,v 1.25 2006/06/05 22:49:44 jlam Exp $
#
# This Makefile fragment is included to bsd.pkg.mk and defines the
# relevant variables and targets for the "extract" phase.
@@ -200,7 +200,7 @@
.PHONY: extract-message
extract-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Extracting for ${PKGNAME}"
+ @${PHASE_MSG} "Extracting for ${PKGNAME}"
.PHONY: extract-cookie
extract-cookie:
diff -r eb7bdeee2485 -r a2dda8bb5a53 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Mon Jun 05 22:34:40 2006 +0000
+++ b/mk/bsd.pkg.mk Mon Jun 05 22:49:44 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1838 2006/06/05 17:56:10 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1839 2006/06/05 22:49:44 jlam Exp $
#
# This file is in the public domain.
#
@@ -723,7 +723,7 @@
@${DO_NADA}
. else
@for str in ${PKG_FAIL_REASON} ${PKG_SKIP_REASON}; do \
- ${ECHO} "${_PKGSRC_IN}> $$str"; \
+ ${PHASE_MSG} "$$str"; \
done
. endif
. if defined(PKG_FAIL_REASON)
@@ -1011,13 +1011,13 @@
esac; \
done; \
case "$$gotfiles" in \
- no) ${ECHO} "*** This package requires user intervention to download the distfiles"; \
- ${ECHO} "*** Please fetch the distfiles manually and place them in"; \
- ${ECHO} "*** ${DISTDIR}"; \
+ no) ${ERROR_MSG} "This package requires user intervention to download the distfiles"; \
+ ${ERROR_MSG} "Please fetch the distfiles manually and place them in"; \
+ ${ERROR_MSG} "${DISTDIR}"; \
[ ! -z "${MASTER_SITES}" ] && \
- ${ECHO} "*** The distfiles are available from ${MASTER_SITES}"; \
+ ${ERROR_MSG} "The distfiles are available from ${MASTER_SITES}"; \
[ ! -z "${HOMEPAGE}" ] && \
- ${ECHO} "*** See ${HOMEPAGE} for more details"; \
+ ${ERROR_MSG} "See ${HOMEPAGE} for more details"; \
${ECHO}; \
${TOUCH} ${_INTERACTIVE_COOKIE}; \
${FALSE} ;; \
@@ -1029,7 +1029,7 @@
. if !defined(ALLOW_VULNERABLE_PACKAGES)
${_PKG_SILENT}${_PKG_DEBUG} \
if [ -f ${PKGVULNDIR}/pkg-vulnerabilities ]; then \
- ${ECHO_MSG} "${_PKGSRC_IN}> Checking for vulnerabilities in ${PKGNAME}"; \
+ ${PHASE_MSG} "Checking for vulnerabilities in ${PKGNAME}"; \
vul=`${MAKE} ${MAKEFLAGS} check-vulnerable`; \
case "$$vul" in \
"") ;; \
@@ -1038,10 +1038,10 @@
${FALSE} ;; \
esac; \
else \
- ${ECHO_MSG} "${_PKGSRC_IN}> *** No ${PKGVULNDIR}/pkg-vulnerabilities file found,"; \
- ${ECHO_MSG} "${_PKGSRC_IN}> *** skipping vulnerability checks. To fix, install"; \
- ${ECHO_MSG} "${_PKGSRC_IN}> *** the pkgsrc/security/audit-packages package and run"; \
- ${ECHO_MSG} "${_PKGSRC_IN}> *** '${LOCALBASE}/sbin/download-vulnerability-list'."; \
+ ${WARNING_MSG} "No ${PKGVULNDIR}/pkg-vulnerabilities file found,"; \
+ ${WARNING_MSG} "skipping vulnerability checks. To fix, install"; \
+ ${WARNING_MSG} "the pkgsrc/security/audit-packages package and run"; \
+ ${WARNING_MSG} "'${LOCALBASE}/sbin/download-vulnerability-list'."; \
fi
. endif
. if !empty(_ALLFILES)
@@ -1576,8 +1576,8 @@
.endif
${_CONFIGURE_COOKIE}:
.if !empty(INTERACTIVE_STAGE:Mconfigure) && defined(BATCH)
- @${ECHO} "*** The configuration stage of this package requires user interaction"
- @${ECHO} "*** Please configure manually with \"cd ${PKGDIR} && ${MAKE} configure\""
+ @${ERROR_MSG} "The configuration stage of this package requires user interaction"
+ @${ERROR_MSG} "Please configure manually with \"cd ${PKGDIR} && ${MAKE} configure\""
@${TOUCH} ${_INTERACTIVE_COOKIE}
@${FALSE}
.else
@@ -1599,8 +1599,8 @@
.endif
${_BUILD_COOKIE}:
.if !empty(INTERACTIVE_STAGE:Mbuild) && defined(BATCH)
- @${ECHO} "*** The build stage of this package requires user interaction"
- @${ECHO} "*** Please build manually with \"cd ${PKGDIR} && ${MAKE} build\""
+ @${ERROR_MSG} "The build stage of this package requires user interaction"
+ @${ERROR_MSG} "Please build manually with \"cd ${PKGDIR} && ${MAKE} build\""
@${TOUCH} ${_INTERACTIVE_COOKIE}
@${FALSE}
.else
@@ -1613,15 +1613,15 @@
.PHONY: tools-message wrapper-message
.PHONY: configure-message build-message test-message
tools-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Overriding tools for ${PKGNAME}"
+ @${PHASE_MSG} "Overriding tools for ${PKGNAME}"
wrapper-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Creating toolchain wrappers for ${PKGNAME}"
+ @${PHASE_MSG} "Creating toolchain wrappers for ${PKGNAME}"
configure-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Configuring for ${PKGNAME}"
+ @${PHASE_MSG} "Configuring for ${PKGNAME}"
build-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Building for ${PKGNAME}"
+ @${PHASE_MSG} "Building for ${PKGNAME}"
test-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Testing for ${PKGNAME}"
+ @${PHASE_MSG} "Testing for ${PKGNAME}"
.PHONY: tools-cookie wrapper-cookie
.PHONY: configure-cookie build-cookie test-cookie
@@ -1672,12 +1672,12 @@
else \
case ${PRE_ROOT_CMD:Q}"" in \
${TRUE:Q}"") ;; \
- *) ${ECHO} "*** WARNING *** Running: "${PRE_ROOT_CMD:Q} ;; \
+ *) ${WARNING_MSG} "Running: "${PRE_ROOT_CMD:Q} ;; \
esac; \
${PRE_ROOT_CMD}; \
- ${ECHO_MSG} "${_PKGSRC_IN}> Becoming \`\`${ROOT_USER}'' to make su-${.TARGET} (`${ECHO} ${SU_CMD} | ${AWK} '{ print $$1 }'`)"; \
+ ${PHASE_MSG} "Becoming \`\`${ROOT_USER}'' to make su-${.TARGET} (`${ECHO} ${SU_CMD} | ${AWK} '{ print $$1 }'`)"; \
${SU_CMD} "cd ${.CURDIR}; ${SETENV} PATH='$${PATH}:${SU_CMD_PATH_APPEND}' ${MAKE} ${MAKEFLAGS} PKG_DEBUG_LEVEL=${PKG_DEBUG_LEVEL} su-${.TARGET} ${MAKEFLAGS.su-${.TARGET}}"; \
- ${ECHO_MSG} "${_PKGSRC_IN}> Dropping \`\`${ROOT_USER}'' privileges."; \
+ ${PHASE_MSG} "Dropping \`\`${ROOT_USER}'' privileges."; \
fi
# Empty pre-* and post-* targets
@@ -1726,7 +1726,7 @@
.PHONY: distclean
.if !target(distclean)
distclean: pre-distclean clean
- ${_PKG_SILENT}${ECHO_MSG} "${_PKGSRC_IN}> Dist cleaning for ${PKGNAME}"
+ @${PHASE_MSG} "Dist cleaning for ${PKGNAME}"
${_PKG_SILENT}${_PKG_DEBUG}if [ -d ${_DISTDIR} ]; then \
cd ${_DISTDIR} && \
${TEST} -z "${DISTFILES}" || ${RM} -f ${DISTFILES}; \
@@ -2013,10 +2013,9 @@
su-bin-install:
@found="`${PKG_BEST_EXISTS} \"${PKGWILDCARD}\" || ${TRUE}`"; \
if [ "$$found" != "" ]; then \
- ${ECHO_MSG} "${_PKGSRC_IN}> $$found is already installed - perhaps an older version?"; \
- ${ECHO_MSG} "*** If so, you may wish to \`\`pkg_delete $$found'' and install"; \
- ${ECHO_MSG} "*** this package again by \`\`${MAKE} bin-install'' to upgrade it properly."; \
- ${SHCOMMENT} ${ECHO_MSG} "*** or use \`\`${MAKE} bin-update'' to upgrade it and all of its dependencies."; \
+ ${ERROR_MSG} "$$found is already installed - perhaps an older version?"; \
+ ${ERROR_MSG} "If so, you may wish to \`\`pkg_delete $$found'' and install"; \
+ ${ERROR_MSG} "this package again by \`\`${MAKE} bin-install'' to upgrade it properly."; \
exit 1; \
fi
@rel=${_SHORT_UNAME_R:Q} ; \
@@ -2036,7 +2035,7 @@
.PHONY: bin-install
bin-install: su-target
- @${ECHO_MSG} "${_PKGSRC_IN}> Binary install for "${PKGNAME_REQD:U${PKGNAME}:Q}
+ @${PHASE_MSG} "Binary install for "${PKGNAME_REQD:U${PKGNAME}:Q}
################################################################
@@ -2445,7 +2444,7 @@
PKG_ERROR_HANDLER.${_class_}?= { \
ec=$$?; \
for str in ${PKG_ERROR_MSG.${_class_}}; do \
- ${ECHO} "${_PKGSRC_IN}> $$str"; \
+ ${PHASE_MSG} "$$str"; \
done; \
exit $$ec; \
}
diff -r eb7bdeee2485 -r a2dda8bb5a53 mk/bsd.pkg.patch.mk
--- a/mk/bsd.pkg.patch.mk Mon Jun 05 22:34:40 2006 +0000
+++ b/mk/bsd.pkg.patch.mk Mon Jun 05 22:49:44 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.patch.mk,v 1.22 2006/06/04 04:31:47 jlam Exp $
+# $NetBSD: bsd.pkg.patch.mk,v 1.23 2006/06/05 22:49:44 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and defines the
# relevant variables and targets for the "patch" phase.
@@ -189,12 +189,12 @@
.PHONY: distribution-patch-message do-distribution-patch
distribution-patch-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Applying distribution patches for ${PKGNAME}"
+ @${PHASE_MSG} "Applying distribution patches for ${PKGNAME}"
.if !target(do-distribution-patch)
do-distribution-patch:
. for i in ${PATCHFILES}
- @${ECHO_PATCH_MSG} "${_PKGSRC_IN}> Applying distribution patch ${i}"
+ @${ECHO_PATCH_MSG} "Applying distribution patch ${i}"
${_PKG_SILENT}${_PKG_DEBUG}cd ${_DISTDIR}; \
${PATCH_DIST_CAT.${i:S/=/--/}} | \
${PATCH} ${PATCH_DIST_ARGS.${i:S/=/--/}} \
@@ -214,7 +214,7 @@
.PHONY: pkgsrc-patch-message do-pkgsrc-patch
pkgsrc-patch-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Applying pkgsrc patches for ${PKGNAME}"
+ @${PHASE_MSG} "Applying pkgsrc patches for ${PKGNAME}"
.if !target(do-pkgsrc-patch)
do-pkgsrc-patch:
@@ -230,7 +230,7 @@
${TEST} -f "$$i" || continue; \
case "$$i" in \
*.orig|*.rej|*~) \
- ${ECHO_MSG} "${_PKGSRC_IN}> Ignoring patchfile $$i"; \
+ ${STEP_MSG} "Ignoring patchfile $$i"; \
continue; \
;; \
${PATCHDIR}/patch-local-*) \
@@ -258,7 +258,7 @@
fi; \
;; \
esac; \
- ${ECHO_PATCH_MSG} "${_PKGSRC_IN}> Applying pkgsrc patch $$i"; \
+ ${ECHO_PATCH_MSG} "Applying pkgsrc patch $$i"; \
fuzz_flags=; \
if ${PATCH} -v >/dev/null 2>&1; then \
fuzz_flags=${PATCH_FUZZ_FACTOR:Q}; \
@@ -309,7 +309,7 @@
.PHONY: patch-message
patch-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Patching for ${PKGNAME}"
+ @${PHASE_MSG} "Patching for ${PKGNAME}"
.PHONY: patch-cookie
patch-cookie:
diff -r eb7bdeee2485 -r a2dda8bb5a53 mk/bsd.pkg.update.mk
--- a/mk/bsd.pkg.update.mk Mon Jun 05 22:34:40 2006 +0000
+++ b/mk/bsd.pkg.update.mk Mon Jun 05 22:49:44 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.update.mk,v 1.3 2006/06/05 17:21:54 jlam Exp $
+# $NetBSD: bsd.pkg.update.mk,v 1.4 2006/06/05 22:49:44 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and contains the targets
# and variables for "make update".
@@ -39,8 +39,7 @@
CLEAR_DIRLIST?= NO
update:
- ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} \
- "${_PKGSRC_IN}> Resuming update for ${PKGNAME}"
+ @${PHASE_MSG} "Resuming update for ${PKGNAME}"
. if ${REINSTALL} != "NO" && ${UPDATE_TARGET} != "replace"
${_PKG_SILENT}${_PKG_DEBUG} \
${MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL
@@ -64,7 +63,7 @@
${_PKG_SILENT}${_PKG_DEBUG} \
[ ! -s ${_DDIR} ] || for dep in `${CAT} ${_DDIR}` ; do \
(if cd ../.. && cd "$${dep}" ; then \
- ${ECHO_MSG} "${_PKGSRC_IN}> Installing in $${dep}" && \
+ ${PHASE_MSG} "Installing in $${dep}" && \
if [ "(" "${RESUMEUPDATE}" = "NO" -o \
"${REINSTALL}" != "NO" ")" -a \
"${UPDATE_TARGET}" != "replace" ] ; then \
@@ -73,7 +72,7 @@
${MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} \
DEPENDS_TARGET=${DEPENDS_TARGET:Q} ; \
else \
- ${ECHO_MSG} "${_PKGSRC_IN}> Skipping removed directory $${dep}"; \
+ ${PHASE_MSG} "Skipping removed directory $${dep}"; \
fi) ; \
done
Home |
Main Index |
Thread Index |
Old Index