app-portage/gentoolkit: make postinst message conditional
authorZac Medico <zmedico@gentoo.org>
Tue, 7 Aug 2018 22:55:57 +0000 (15:55 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 7 Aug 2018 22:57:34 +0000 (15:57 -0700)
Package-Manager: Portage-2.3.44, Repoman-2.3.10

app-portage/gentoolkit/gentoolkit-0.4.0.ebuild
app-portage/gentoolkit/gentoolkit-0.4.1.ebuild
app-portage/gentoolkit/gentoolkit-0.4.2-r1.ebuild

index c96bc49af449840636fc92f09bfc1313e8db63da..47665d99a84fe57ac811388e7dae79c0545aa9b0 100644 (file)
@@ -35,16 +35,24 @@ python_install_all() {
        distutils-r1_python_install_all
 }
 
+pkg_preinst() {
+       if has_version "<${CATEGORY}/${PN}-0.4.0"; then
+               SHOW_GENTOOKIT_DEV_DEPRECATED_MSG=1
+       fi
+}
+
 pkg_postinst() {
        # Create cache directory for revdep-rebuild
        mkdir -p -m 0755 "${EROOT%/}"/var/cache
        mkdir -p -m 0700 "${EROOT%/}"/var/cache/revdep-rebuild
 
-       elog "Starting with this version, ebump, ekeyword and imlate are now"
-       elog "part of the gentoolkit package."
-       elog "The gentoolkit-dev package is now deprecated in favor of a single"
-       elog "gentoolkit package.   The remaining tools from gentoolkit-dev"
-       elog "are now obsolete/unused with the git based tree."
+       if [[ ${SHOW_GENTOOKIT_DEV_DEPRECATED_MSG} ]]; then
+               elog "Starting with this version, ebump, ekeyword and imlate are now"
+               elog "part of the gentoolkit package."
+               elog "The gentoolkit-dev package is now deprecated in favor of a single"
+               elog "gentoolkit package.   The remaining tools from gentoolkit-dev"
+               elog "are now obsolete/unused with the git based tree."
+       fi
 
        # Only show the elog information on a new install
        if [[ ! ${REPLACING_VERSIONS} ]]; then
index 7d5fb8c5f73a21767870227fe0e7d76de05486ed..6722fbcda234fc2812b2711ff000480542dd29d0 100644 (file)
@@ -35,16 +35,24 @@ python_install_all() {
        distutils-r1_python_install_all
 }
 
+pkg_preinst() {
+       if has_version "<${CATEGORY}/${PN}-0.4.0"; then
+               SHOW_GENTOOKIT_DEV_DEPRECATED_MSG=1
+       fi
+}
+
 pkg_postinst() {
        # Create cache directory for revdep-rebuild
        mkdir -p -m 0755 "${EROOT%/}"/var/cache
        mkdir -p -m 0700 "${EROOT%/}"/var/cache/revdep-rebuild
 
-       elog "Starting with version 0.4.0, ebump, ekeyword and imlate are now"
-       elog "part of the gentoolkit package."
-       elog "The gentoolkit-dev package is now deprecated in favor of a single"
-       elog "gentoolkit package.   The remaining tools from gentoolkit-dev"
-       elog "are now obsolete/unused with the git based tree."
+       if [[ ${SHOW_GENTOOKIT_DEV_DEPRECATED_MSG} ]]; then
+               elog "Starting with version 0.4.0, ebump, ekeyword and imlate are now"
+               elog "part of the gentoolkit package."
+               elog "The gentoolkit-dev package is now deprecated in favor of a single"
+               elog "gentoolkit package.   The remaining tools from gentoolkit-dev"
+               elog "are now obsolete/unused with the git based tree."
+       fi
 
        # Only show the elog information on a new install
        if [[ ! ${REPLACING_VERSIONS} ]]; then
index 1670a73c840a7ac1caccf71077517589165466fd..3ef6b39ef0785943706f3f3ea67b72720d3119d3 100644 (file)
@@ -39,16 +39,24 @@ python_install_all() {
        distutils-r1_python_install_all
 }
 
+pkg_preinst() {
+       if has_version "<${CATEGORY}/${PN}-0.4.0"; then
+               SHOW_GENTOOKIT_DEV_DEPRECATED_MSG=1
+       fi
+}
+
 pkg_postinst() {
        # Create cache directory for revdep-rebuild
        mkdir -p -m 0755 "${EROOT%/}"/var/cache
        mkdir -p -m 0700 "${EROOT%/}"/var/cache/revdep-rebuild
 
-       elog "Starting with version 0.4.0, ebump, ekeyword and imlate are now"
-       elog "part of the gentoolkit package."
-       elog "The gentoolkit-dev package is now deprecated in favor of a single"
-       elog "gentoolkit package.   The remaining tools from gentoolkit-dev"
-       elog "are now obsolete/unused with the git based tree."
+       if [[ ${SHOW_GENTOOKIT_DEV_DEPRECATED_MSG} ]]; then
+               elog "Starting with version 0.4.0, ebump, ekeyword and imlate are now"
+               elog "part of the gentoolkit package."
+               elog "The gentoolkit-dev package is now deprecated in favor of a single"
+               elog "gentoolkit package.   The remaining tools from gentoolkit-dev"
+               elog "are now obsolete/unused with the git based tree."
+       fi
 
        # Only show the elog information on a new install
        if [[ ! ${REPLACING_VERSIONS} ]]; then