commit:     1dd3cbfa7603b48dd2dc52997e8df73fb13370f0
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 14 14:12:00 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 22 09:38:20 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dd3cbfa

sys-apps/openrc: Port to ver_replacing

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

 sys-apps/openrc/openrc-0.56.ebuild | 17 +++++++----------
 sys-apps/openrc/openrc-9999.ebuild | 17 +++++++----------
 2 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/sys-apps/openrc/openrc-0.56.ebuild 
b/sys-apps/openrc/openrc-0.56.ebuild
index 45409f32d5a4..030d8ccdd3ac 100644
--- a/sys-apps/openrc/openrc-0.56.ebuild
+++ b/sys-apps/openrc/openrc-0.56.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=8
 
-inherit meson pam
+inherit eapi9-ver meson pam
 
 DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
 HOMEPAGE="https://github.com/openrc/openrc/";
@@ -152,13 +152,10 @@ pkg_postinst() {
        fi
 
        # added for 0.45 to handle seedrng/urandom switching (2022-06-07)
-       for v in ${REPLACING_VERSIONS}; do
-               [[ -x $(type rc-update) ]] || continue
-               if ver_test $v -lt 0.45; then
-                       if rc-update show boot | grep -q urandom; then
-                               rc-update del urandom boot
-                               rc-update add seedrng boot
+       if ver_replacing -lt 0.45 && ! [[ -x $(type rc-update) ]]; then
+               if rc-update show boot | grep -q urandom; then
+                       rc-update del urandom boot
+                       rc-update add seedrng boot
                fi
-               fi
-       done
+       fi
 }

diff --git a/sys-apps/openrc/openrc-9999.ebuild 
b/sys-apps/openrc/openrc-9999.ebuild
index 45409f32d5a4..030d8ccdd3ac 100644
--- a/sys-apps/openrc/openrc-9999.ebuild
+++ b/sys-apps/openrc/openrc-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=8
 
-inherit meson pam
+inherit eapi9-ver meson pam
 
 DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
 HOMEPAGE="https://github.com/openrc/openrc/";
@@ -152,13 +152,10 @@ pkg_postinst() {
        fi
 
        # added for 0.45 to handle seedrng/urandom switching (2022-06-07)
-       for v in ${REPLACING_VERSIONS}; do
-               [[ -x $(type rc-update) ]] || continue
-               if ver_test $v -lt 0.45; then
-                       if rc-update show boot | grep -q urandom; then
-                               rc-update del urandom boot
-                               rc-update add seedrng boot
+       if ver_replacing -lt 0.45 && ! [[ -x $(type rc-update) ]]; then
+               if rc-update show boot | grep -q urandom; then
+                       rc-update del urandom boot
+                       rc-update add seedrng boot
                fi
-               fi
-       done
+       fi
 }

Reply via email to