commit:     c51606ad9813a79a8f6c8ecdb2efa3c54cdbb58a
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 14 14:12:10 2025 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 15 09:26:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c51606ad

sys-fs/cryfs: Port to ver_replacing

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

 sys-fs/cryfs/cryfs-1.0.1.ebuild | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/sys-fs/cryfs/cryfs-1.0.1.ebuild b/sys-fs/cryfs/cryfs-1.0.1.ebuild
index e84bb6a6184c..dfbb7de32b8e 100644
--- a/sys-fs/cryfs/cryfs-1.0.1.ebuild
+++ b/sys-fs/cryfs/cryfs-1.0.1.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{10..13} )
-inherit cmake flag-o-matic linux-info python-any-r1
+inherit cmake eapi9-ver flag-o-matic linux-info python-any-r1
 
 if [[ ${PV} == 9999 ]] ; then
        inherit git-r3
@@ -165,16 +165,11 @@ src_install() {
 }
 
 pkg_postinst() {
-       if [[ -n ${REPLACING_VERSIONS} ]] ; then
-               for ver in "${REPLACING_VERSIONS[@]}" ; do
-                       if ver_test "${ver}" -lt 1.0.0; then
-                               elog "Filesystems created with CryFS 0.11.x and 
CryFS 1.0.0 are fully compatible with each other."
-                               elog "This means filesystems created with 
0.10.x or 0.11.x can be mounted without requiring a migration."
-                               elog "Filesystems created with 1.0.0 or 0.11.x 
can be mounted by CryFS 0.10.x,"
-                               elog "but only if you configure it to use a 
cipher supported by CryFS 0.10.x, e.g. AES-256-GCM."
-                               elog "The new default, XChaCha20-Poly1305, is 
not supported by CryFS 0.10.x."
-                               break
-                       fi
-               done
+       if ver_replacing -lt 1.0.0; then
+               elog "Filesystems created with CryFS 0.11.x and CryFS 1.0.0 are 
fully compatible with each other."
+               elog "This means filesystems created with 0.10.x or 0.11.x can 
be mounted without requiring a migration."
+               elog "Filesystems created with 1.0.0 or 0.11.x can be mounted 
by CryFS 0.10.x,"
+               elog "but only if you configure it to use a cipher supported by 
CryFS 0.10.x, e.g. AES-256-GCM."
+               elog "The new default, XChaCha20-Poly1305, is not supported by 
CryFS 0.10.x."
        fi
 }

Reply via email to