commit:     f6c6517b896a23cd396e383cef3caf0f508ed1e5
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 14 14:11:29 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 22 09:38:14 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6c6517b

net-analyzer/icinga2: Port to ver_replacing

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 net-analyzer/icinga2/icinga2-2.14.3.ebuild | 15 +++++----------
 net-analyzer/icinga2/icinga2-9999.ebuild   | 15 +++++----------
 2 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/net-analyzer/icinga2/icinga2-2.14.3.ebuild 
b/net-analyzer/icinga2/icinga2-2.14.3.ebuild
index 1ce211b79dc7..bbd4236eb875 100644
--- a/net-analyzer/icinga2/icinga2-2.14.3.ebuild
+++ b/net-analyzer/icinga2/icinga2-2.14.3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-inherit cmake systemd
+inherit cmake eapi9-ver systemd
 
 if [[ ${PV} != 9999 ]]; then
        SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
@@ -134,13 +134,8 @@ src_install() {
 }
 
 pkg_postinst() {
-       if [[ "${PV}" != 9999 ]]; then
-               local v
-               for v in ${REPLACING_VERSIONS}; do
-                       if ver_test "${PV}" -gt "${v}"; then
-                               elog "DB IDO schema upgrade may be required."
-                               elog 
"https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/";
-                       fi
-               done
+       if [[ "${PV}" != 9999 ]] && ver_replacing -lt "${PV}"; then
+               elog "DB IDO schema upgrade may be required."
+               elog 
"https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/";
        fi
 }

diff --git a/net-analyzer/icinga2/icinga2-9999.ebuild 
b/net-analyzer/icinga2/icinga2-9999.ebuild
index f2525a95a10b..e001d26c92ba 100644
--- a/net-analyzer/icinga2/icinga2-9999.ebuild
+++ b/net-analyzer/icinga2/icinga2-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-inherit cmake
+inherit cmake eapi9-ver
 
 if [[ ${PV} != 9999 ]]; then
        SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
@@ -130,13 +130,8 @@ src_install() {
 }
 
 pkg_postinst() {
-       if [[ "${PV}" != 9999 ]]; then
-               local v
-               for v in ${REPLACING_VERSIONS}; do
-                       if ver_test "${PV}" -gt "${v}"; then
-                               elog "DB IDO schema upgrade may be required."
-                               elog 
"https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/";
-                       fi
-               done
+       if [[ "${PV}" != 9999 ]] && ver_replacing -lt "${PV}"; then
+               elog "DB IDO schema upgrade may be required."
+               elog 
"https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/";
        fi
 }

Reply via email to