Permalink
Browse files

Use PHASE_MSG, STEP_MSG, WARNING_MSG, and ERROR_MSG in place of ECHO_MSG

in various places.
  • Loading branch information...
jlam
jlam committed Jun 5, 2006
1 parent be49722 commit 53183b6fe117d2c2e73bca4c126623d2c3894230
View
@@ -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 @@ post-clean:
.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)
View
@@ -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 @@ _REAL_EXTRACT_TARGETS+= extract-cookie
.PHONY: extract-message
extract-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Extracting for ${PKGNAME}"
+ @${PHASE_MSG} "Extracting for ${PKGNAME}"
.PHONY: extract-cookie
extract-cookie:
View
@@ -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 @@ update depends do-check-pkg-fail-or-skip-reason:
@${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 @@ batch-check-distfiles:
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 @@ do-fetch:
. 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 @@ do-fetch:
${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 @@ PKG_ERROR_MSG.configure+= \
.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 @@ PKG_ERROR_MSG.build+= \
.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 @@ ${_TEST_COOKIE}:
.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 @@ su-target: .USE
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 @@ pre-distclean:
.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 @@ _SHORT_UNAME_R= ${:!${UNAME} -r!:C@\.([0-9]*)[_.].*@.\1@} # n.n[_.]anything => n
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 @@ su-bin-install:
.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 @@ tags:
PKG_ERROR_HANDLER.${_class_}?= { \
ec=$$?; \
for str in ${PKG_ERROR_MSG.${_class_}}; do \
- ${ECHO} "${_PKGSRC_IN}> $$str"; \
+ ${PHASE_MSG} "$$str"; \
done; \
exit $$ec; \
}
View
@@ -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 @@ _GENERATE_PATCH_COOKIE= \
.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 @@ _PKGSRC_PATCHES+= ${LOCALPATCHES}/${PKGPATH}/*
.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 @@ do-pkgsrc-patch:
${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 @@ do-pkgsrc-patch:
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 @@ _REAL_PATCH_TARGETS+= patch-cookie
.PHONY: patch-message
patch-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Patching for ${PKGNAME}"
+ @${PHASE_MSG} "Patching for ${PKGNAME}"
.PHONY: patch-cookie
patch-cookie:
View
@@ -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 @@ RESUMEUPDATE?= YES
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 @@ update:
${_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 @@ update:
${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
.if ${NOCLEAN} == "NO"
@@ -91,7 +90,7 @@ clean-update:
(if cd ../.. && cd "$${dep}" ; then \
${MAKE} ${MAKEFLAGS} clean ; \
else \
- ${ECHO_MSG} "${_PKGSRC_IN}> Skipping removed directory $${dep}";\
+ ${PHASE_MSG} "Skipping removed directory $${dep}";\
fi) ; \
done ; \
fi
@@ -101,10 +100,9 @@ clean-update:
${_PKG_SILENT}${_PKG_DEBUG} \
${MAKE} ${MAKEFLAGS} clean update-dirlist \
DIRLIST="`${CAT} ${_DDIR}`" PKGLIST="`${CAT} ${_DLIST}`"
- ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} \
- "${_PKGSRC_IN}> Warning: preserved leftover directory list. Your next";\
- ${ECHO_MSG} "${_PKGSRC_IN}> \`\`${MAKE} update'' may fail. It is advised to use";\
- ${ECHO_MSG} "${_PKGSRC_IN}> \`\`${MAKE} update REINSTALL=YES'' instead!"
+ @${WARNING_MSG} "Warning: preserved leftover directory list. Your next"
+ @${WARNING_MSG} " \`\`${MAKE} update'' may fail. It is advised to use"
+ @${WARNING_MSG} " \`\`${MAKE} update REINSTALL=YES'' instead!"
.endif
.endif # !target(update)
@@ -1,11 +1,13 @@
-# $NetBSD: check-vulnerable.mk,v 1.1 2006/06/03 23:11:42 jlam Exp $
+# $NetBSD: check-vulnerable.mk,v 1.2 2006/06/05 22:49:44 jlam Exp $
###########################################################################
-# check-vulnerable checks for vulnerabilities in the package. This should
-# be overridden per package system flavor.
+### check-vulnerable (PRIVATE, override)
+###########################################################################
+### check-vulnerable checks for vulnerabilities in the package. This
+### should be overridden per package system flavor.
#
.PHONY: check-vulnerable
.if !target(check-vulnerable)
check-vulnerable:
- @${ECHO_MSG} "${_PKGSRC_IN} *** Skipping vulnerability checks."
+ @${PHASE_MSG} "Skipping vulnerability checks."
.endif
View
@@ -1,4 +1,4 @@
-# $NetBSD: depends.mk,v 1.2 2006/06/04 13:48:51 jlam Exp $
+# $NetBSD: depends.mk,v 1.3 2006/06/05 22:49:44 jlam Exp $
_DEPENDS_FILE= ${WRKDIR}/.depends
_REDUCE_DEPENDS_CMD= ${SETENV} CAT=${CAT:Q} \
@@ -77,11 +77,11 @@ depends-install: ${_DEPENDS_FILE}
pkg=`${_PKG_BEST_EXISTS} "$$pattern" || ${TRUE}`; \
case "$$pkg" in \
"") \
- ${ECHO_MSG} "${_PKGSRC_IN}> Required installed package $$pattern: NOT found"; \
+ ${PHASE_MSG} "Required installed package $$pattern: NOT found"; \
target=${DEPENDS_TARGET}; \
- ${ECHO_MSG} "${_PKGSRC_IN}> Verifying $$target for $$dir"; \
+ ${PHASE_MSG} "Verifying $$target for $$dir"; \
if ${TEST} ! -d "$$dir"; then \
- ${ERROR_MSG} "=> [depends.mk] The directory \`\`$$dir'' does not exist."; \
+ ${ERROR_MSG} "[depends.mk] The directory \`\`$$dir'' does not exist."; \
exit 1; \
fi; \
cd $$dir; \
@@ -93,7 +93,7 @@ depends-install: ${_DEPENDS_FILE}
${ERROR_MSG} " stale work directory for $$dir?"; \
exit 1; \
esac; \
- ${ECHO_MSG} "${_PKGSRC_IN}> Returning to build of ${PKGNAME}"; \
+ ${PHASE_MSG} "Returning to build of ${PKGNAME}"; \
;; \
*) \
objfmt=`${PKG_INFO} -Q OBJECT_FMT "$$pkg"`; \
@@ -106,7 +106,7 @@ depends-install: ${_DEPENDS_FILE}
exit 1; \
;; \
esac; \
- ${ECHO_MSG} "${_PKGSRC_IN}> Required installed package $$pattern: $$pkg found"; \
+ ${PHASE_MSG} "Required installed package $$pattern: $$pkg found"; \
;; \
esac; \
done
View
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.1 2006/06/03 23:11:42 jlam Exp $
+# $NetBSD: install.mk,v 1.2 2006/06/05 22:49:44 jlam Exp $
######################################################################
### install-check-conflicts (PRIVATE, pkgsrc/mk/install/install.mk)
@@ -65,7 +65,7 @@ _REGISTER_DEPENDENCIES= \
.PHONY: register-pkg
register-pkg: generate-metadata ${_DEPENDS_COOKIE}
- @${ECHO_MSG} "${_PKGSRC_IN}> Registering installation for ${PKGNAME}"
+ @${PHASE_MSG} "Registering installation for ${PKGNAME}"
${_PKG_SILENT}${_PKG_DEBUG}${RM} -fr ${_PKG_DBDIR}/${PKGNAME}
${_PKG_SILENT}${_PKG_DEBUG}${CP} -R ${PKG_DB_TMPDIR} ${_PKG_DBDIR}
${_PKG_SILENT}${_PKG_DEBUG}${PKG_ADMIN} add ${PKGNAME}
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.1 2006/06/03 23:11:42 jlam Exp $
+# $NetBSD: metadata.mk,v 1.2 2006/06/05 22:49:44 jlam Exp $
######################################################################
### The targets below are all PRIVATE.
@@ -230,7 +230,7 @@ ${_MESSAGE_FILE}: ${MESSAGE_SRC}
.PHONY: install-display-message
register-pkg: install-display-message
install-display-message: ${_MESSAGE_FILE}
- @${ECHO_MSG} "${_PKGSRC_IN}> Please note the following:"
+ @${PHASE_MSG} "Please note the following:"
@${ECHO_MSG} ""
@${CAT} ${_MESSAGE_FILE}
@${ECHO_MSG} ""
Oops, something went wrong.

0 comments on commit 53183b6

Please sign in to comment.