From f6c6517b896a23cd396e383cef3caf0f508ed1e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Fri, 14 Feb 2025 15:11:29 +0100 Subject: [PATCH] net-analyzer/icinga2: Port to ver_replacing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ulrich Müller --- 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 1ce211b79dc7a..bbd4236eb875a 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 f2525a95a10be..e001d26c92ba2 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 }