This can be useful when, for example, doc contents are modified. You can
then rely on using REPLACING_VERSIONS in your ebuild to print messages
when people updates from versions using old docs

Patch to review attached

--- readme.gentoo.eclass	2013-01-20 12:42:30.000000000 +0100
+++ /usr/portage/eclass/readme.gentoo.eclass	2013-01-21 22:06:46.000000000 +0100
@@ -66,6 +66,18 @@
 	fi
 }
 
+# @FUNCTION: readme.gentoo_force_print_elog
+# @DESCRIPTION:
+# For elog message printing. This can be useful when, for example,
+# DOC_CONTENTS is modified. You can then rely on using REPLACING_VERSIONS
+# in your ebuild to print messages when people updates from versions
+# still providing old message.
+# Should be called before pkg_postinst phase.
+readme.gentoo_force_print_elog() {
+	debug-print-function ${FUNCNAME} "${@}"
+	touch "${T}"/README.gentoo.force_print_elog
+}
+
 # @FUNCTION: readme.gentoo_print_elog
 # @DESCRIPTION:
 # Print elog messages with "${T}"/README.gentoo contents.
@@ -74,7 +86,7 @@
 	debug-print-function ${FUNCNAME} "${@}"
 
 	if [[ -f "${T}"/README.gentoo ]]; then
-		if ! [[ "${REPLACING_VERSIONS}" ]]; then
+		if ! [[ "${REPLACING_VERSIONS}" ]] || [[ -f "${T}"/README.gentoo.force_print_elog ]]; then
 			eshopts_push
 			set -f
 			cat "${T}"/README.gentoo | while read -r ELINE; do elog "${ELINE}"; done

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to