commit:     4b7f4de1a9b5e6b4d052dd053474accb7df70ba4
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 14 14:11:18 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 15 09:26:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b7f4de1

mail-filter/rspamd: Port to ver_replacing

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

 mail-filter/rspamd/rspamd-3.8.4.ebuild | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/mail-filter/rspamd/rspamd-3.8.4.ebuild 
b/mail-filter/rspamd/rspamd-3.8.4.ebuild
index f5242f7e37fb..0e93818e8965 100644
--- a/mail-filter/rspamd/rspamd-3.8.4.ebuild
+++ b/mail-filter/rspamd/rspamd-3.8.4.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
 LUA_COMPAT=( lua5-{1..4} luajit )
 
-inherit cmake lua-single pax-utils systemd tmpfiles
+inherit cmake eapi9-ver lua-single pax-utils systemd tmpfiles
 
 if [[ ${PV} == *9999 ]] ; then
        EGIT_REPO_URI="https://github.com/rspamd/rspamd.git";
@@ -150,15 +150,13 @@ src_install() {
 pkg_postinst() {
        tmpfiles_process "${PN}.conf"
 
-       for ver in ${REPLACING_VERSIONS}; do
-               if ver_test "${ver}" -eq "3.4"; then
-                       elog "rspamd-3.4 is known to segfault when it is 
updated from older version due"
-                       elog "to a page-alignment of hyperscan .unser files. 
The issue was patched in"
-                       elog "rspamd-3.4-r1 ebuild revision. All possibly 
broken .unser files will be"
-                       elog "automaticaly removed. See 
https://github.com/rspamd/rspamd/issues/4329 for"
-                       elog "more information."
-
-                       find "${EROOT}/var/lib/rspamd" -type f -name '*.unser' 
-delete
-               fi
-       done
+       if ver_replacing -eq "3.4"; then
+               elog "rspamd-3.4 is known to segfault when it is updated from 
older version due"
+               elog "to a page-alignment of hyperscan .unser files. The issue 
was patched in"
+               elog "rspamd-3.4-r1 ebuild revision. All possibly broken .unser 
files will be"
+               elog "automaticaly removed. See 
https://github.com/rspamd/rspamd/issues/4329 for"
+               elog "more information."
+
+               find "${EROOT}/var/lib/rspamd" -type f -name '*.unser' -delete
+       fi
 }

Reply via email to