commit:     1cb99cef76ad38593503c5df8b08a89981e148eb
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 14 14:11:31 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=1cb99cef

net-dns/pdns: Port to ver_replacing

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

 net-dns/pdns/pdns-4.9.4.ebuild | 31 ++++++++++---------------------
 1 file changed, 10 insertions(+), 21 deletions(-)

diff --git a/net-dns/pdns/pdns-4.9.4.ebuild b/net-dns/pdns/pdns-4.9.4.ebuild
index f6df116ae075..aa6d7d980d2e 100644
--- a/net-dns/pdns/pdns-4.9.4.ebuild
+++ b/net-dns/pdns/pdns-4.9.4.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 LUA_COMPAT=( lua5-{1..4} luajit )
 PYTHON_COMPAT=( python3_{10..13} )
 
-inherit flag-o-matic lua-single python-any-r1
+inherit eapi9-ver flag-o-matic lua-single python-any-r1
 
 DESCRIPTION="The PowerDNS Daemon"
 HOMEPAGE="https://www.powerdns.com/";
@@ -132,10 +132,7 @@ pkg_postinst() {
        elog "The name must be in the format pdns.<suffix> and PowerDNS will 
use the"
        elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of 
the default."
 
-       local old
-       for old in ${REPLACING_VERSIONS}; do
-               ver_test ${old} -lt 3.2 || continue
-
+       if ver_replacing -lt 3.2; then
                echo
                ewarn "To fix a security bug (bug #458018) had the following"
                ewarn "files/directories the world-readable bit removed (if 
set):"
@@ -144,22 +141,14 @@ pkg_postinst() {
                ewarn "Check if this is correct for your setup"
                ewarn "This is a one-time change and will not happen on 
subsequent updates."
                chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf}
+       fi
 
-               break
-       done
-
-       if use postgres; then
-               for old in ${REPLACING_VERSIONS}; do
-                       ver_test ${old} -lt 4.1.11-r1 || continue
-
-                       echo
-                       ewarn "PowerDNS 4.1.11 contains a security fix for the 
PostgreSQL backend."
-                       ewarn "This security fix needs to be applied manually 
to the database schema."
-                       ewarn "Please refer to the official security advisory 
for more information:"
-                       ewarn
-                       ewarn "  
https://doc.powerdns.com/authoritative/security-advisories/powerdns-advisory-2019-06.html";
-
-                       break
-               done
+       if use postgres && ver_replacing -lt 4.1.11-r1; then
+               echo
+               ewarn "PowerDNS 4.1.11 contains a security fix for the 
PostgreSQL backend."
+               ewarn "This security fix needs to be applied manually to the 
database schema."
+               ewarn "Please refer to the official security advisory for more 
information:"
+               ewarn
+               ewarn "  
https://doc.powerdns.com/authoritative/security-advisories/powerdns-advisory-2019-06.html";
        fi
 }

Reply via email to