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

net-firewall/shorewall: Port to ver_replacing

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

 net-firewall/shorewall/shorewall-5.2.8-r1.ebuild | 52 +++++++++++-------------
 1 file changed, 23 insertions(+), 29 deletions(-)

diff --git a/net-firewall/shorewall/shorewall-5.2.8-r1.ebuild 
b/net-firewall/shorewall/shorewall-5.2.8-r1.ebuild
index a6be3bc94a36..2d8268652faa 100644
--- a/net-firewall/shorewall/shorewall-5.2.8-r1.ebuild
+++ b/net-firewall/shorewall/shorewall-5.2.8-r1.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 linux-info prefix systemd
+inherit eapi9-ver linux-info prefix systemd
 
 DESCRIPTION='A high-level tool for configuring Netfilter'
 HOMEPAGE="https://shorewall.org/";
@@ -426,39 +426,33 @@ pkg_postinst() {
 
        fi
 
-       local v
-       for v in ${REPLACING_VERSIONS}; do
-               if ! ver_test ${v} -ge ${MY_MAJOR_RELEASE_NUMBER}; then
-                       # This is an upgrade
+       if ver_replacing -lt ${MY_MAJOR_RELEASE_NUMBER}; then
+               # This is an upgrade
 
-                       elog "You are upgrading from a previous major version. 
It is highly recommended that you read"
-                       elog ""
-                       elog "  - /usr/share/doc/shorewall*/releasenotes.tx*"
-                       elog "  - https://shorewall.org/Shorewall-5.html#idm214";
-
-                       if use ipv4; then
-                               elog ""
-                               elog "You can auto-migrate your configuration 
using"
-                               elog ""
-                               elog "  # shorewall update -A"
-
-                               if use ipv6; then
-                                       elog "  # shorewall6 update -A"
-                               fi
+               elog "You are upgrading from a previous major version. It is 
highly recommended that you read"
+               elog ""
+               elog "  - /usr/share/doc/shorewall*/releasenotes.tx*"
+               elog "  - https://shorewall.org/Shorewall-5.html#idm214";
 
-                               elog ""
-                               elog "*after* you have merged the changed files 
using one of the configuration"
-                               elog "files update tools of your choice 
(dispatch-conf, etc-update...)."
+               if use ipv4; then
+                       elog ""
+                       elog "You can auto-migrate your configuration using"
+                       elog ""
+                       elog "  # shorewall update -A"
 
-                               elog ""
-                               elog "But if you are not familiar with the 
\"shorewall[6] update\" command,"
-                               elog "please read the shorewall[6] man page 
first."
+                       if use ipv6; then
+                               elog "  # shorewall6 update -A"
                        fi
 
-                       # Show this elog only once
-                       break
+                       elog ""
+                       elog "*after* you have merged the changed files using 
one of the configuration"
+                       elog "files update tools of your choice (dispatch-conf, 
etc-update...)."
+
+                       elog ""
+                       elog "But if you are not familiar with the 
\"shorewall[6] update\" command,"
+                       elog "please read the shorewall[6] man page first."
                fi
-       done
+       fi
 
        if ! use init; then
                elog ""

Reply via email to