sys-fs/zfs: update live ebuild
authorGeorgy Yakovlev <gyakovlev@gentoo.org>
Sun, 18 Aug 2019 00:46:50 +0000 (17:46 -0700)
committerGeorgy Yakovlev <gyakovlev@gentoo.org>
Sun, 18 Aug 2019 01:04:15 +0000 (18:04 -0700)
clarify initramfs support.
many people try to use different unsupported  or outdated tools,
only genkernel and dracut are tested.

Bug: https://bugs.gentoo.org/628404
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
sys-fs/zfs/zfs-9999.ebuild

index df1803820df757b612f867a2019019f394acb7d0..2903557f382ae7cb68f0ba5c665419f2bab55fef 100644 (file)
@@ -189,10 +189,19 @@ src_install() {
 }
 
 pkg_postinst() {
-       if has_version "<=sys-kernel/genkernel-3.5.3.3"; then
-               einfo "genkernel version 3.5.3.3 and earlier does NOT support"
-               einfo " unlocking pools with native zfs encryption enabled at boot"
-               einfo " use dracut or >=genkernel-4.0.0 if you requre this functionality"
+       if use rootfs; then
+               if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then
+                       elog "root on zfs requires initramfs to boot"
+                       elog "the following packages known to provide one and tested on regular basis:"
+                       elog "  sys-kernel/dracut"
+                       elog "  sys-kernel/genkernel"
+               fi
+
+               if has_version "<=sys-kernel/genkernel-3.5.3.3"; then
+                       einfo "genkernel version 3.5.3.3 and earlier does NOT support"
+                       einfo " unlocking pools with native zfs encryption enabled at boot"
+                       einfo " use dracut or >=genkernel-4 if you requre this functionality"
+               fi
        fi
 
        if ! use kernel-builtin && [[ ${PV} = "9999" ]]; then