diff options
author | 2008-03-22 19:44:03 +0000 | |
---|---|---|
committer | 2008-03-22 19:44:03 +0000 | |
commit | 327167532760d84b825f311e16a7772ae52f0216 (patch) | |
tree | be0203bee2f7d5177cfbc9291a36a45d5ea30585 /hooks | |
parent | 43bc59fdfddf3c2dda30e0435e146682297b61b0 (diff) | |
download | paludis-327167532760d84b825f311e16a7772ae52f0216.tar.gz paludis-327167532760d84b825f311e16a7772ae52f0216.tar.xz |
Fix elog.
Diffstat (limited to 'hooks')
-rw-r--r-- | hooks/demos/elog.bash.in | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/hooks/demos/elog.bash.in b/hooks/demos/elog.bash.in index fa6654564..98d1261ae 100644 --- a/hooks/demos/elog.bash.in +++ b/hooks/demos/elog.bash.in @@ -6,7 +6,11 @@ # this functionality, this script should be copied or symlinked into: # # @DATADIR@/paludis/hooks/elog/ +# @DATADIR@/paludis/hooks/install_task_execute_pre/ # @DATADIR@/paludis/hooks/install_task_execute_post/ +# @DATADIR@/paludis/hooks/uninstall_all_pre/ +# @DATADIR@/paludis/hooks/uninstall_all_post/ +# @DATADIR@/paludis/hooks/uninstall_fail/ # # And optionally: # @@ -41,7 +45,15 @@ case "${HOOK}" in echo "E ${CATEGORY}/${PF} ${MESSAGE}" >> "${logfile}" ;; - install_all_pre|uninstall_all_pre) + install_task_execute_pre|install_all_pre|uninstall_all_pre) + if [[ ${HOOK} = install_all_pre ]]; then + paludis_ecmd \ + "ewarn" \ + "" \ + "`echo -ne " ${COLOUR_WARN}*${COLOUR_NORMAL} "`" \ + "Use of elog.bash in phase \"${HOOK}\" is deprecated, see comments at beginning of file for updated instructions" + fi + rm -f "${logfile}" touch "${logfile}" || die "Couldn't create '${logfile}' for elog hooks" if [[ -n "${PALUDIS_REDUCED_GID}" ]] ; then @@ -51,6 +63,14 @@ case "${HOOK}" in ;; install_all_post|uninstall_all_post|install_fail|uninstall_fail|clean_fail|install_task_execute_post) + if [[ ${HOOK} = install_all_post || ${HOOK} = install_fail || ${HOOK} = clean_fail ]]; then + paludis_ecmd \ + "ewarn" \ + "" \ + "`echo -ne " ${COLOUR_WARN}*${COLOUR_NORMAL} "`" \ + "Use of elog.bash in phase \"${HOOK}\" is deprecated, see comments at beginning of file for updated instructions" + fi + echo old_pf="" while read line ; do |