summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2019-05-17 11:39:39 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2019-05-17 14:15:26 -0700
commit5286d0e2a00e995e6aa6e31e6219f713b1d847d9 (patch)
tree0aee23f9588fea5bcfb626753174cf7de3302729 /sys-fs
parentdev-lang/perl: Bump to 5.30.0-RC2 (diff)
downloadgentoo-5286d0e2a00e995e6aa6e31e6219f713b1d847d9.tar.gz
gentoo-5286d0e2a00e995e6aa6e31e6219f713b1d847d9.tar.bz2
gentoo-5286d0e2a00e995e6aa6e31e6219f713b1d847d9.zip
sys-fs/zfs-kmod: update live ebuild
add more robust kernel version check Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-9999.ebuild13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
index 8b0c015bec76..2288b9675064 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
@@ -14,8 +14,8 @@ if [[ ${PV} == "9999" ]]; then
else
SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
KEYWORDS="~amd64"
- ZFS_KERNEL_COMPAT="${ZFS_KERNEL_COMPAT_OVERRIDE:-5.1}"
S="${WORKDIR}/zfs-${PV}"
+ ZFS_KERNEL_COMPAT="5.1"
fi
LICENSE="CDDL debug? ( GPL-2+ )"
@@ -68,10 +68,13 @@ pkg_setup() {
kernel_is -ge 2 6 32 || die "Linux 2.6.32 or newer required"
if [[ ${PV} != "9999" ]]; then
- local KV_MAJOR_MAX="${ZFS_KERNEL_COMPAT%%.*}"
- local KV_MINOR_MAX="${ZFS_KERNEL_COMPAT##*.}"
- kernel_is -le "${KV_MAJOR_MAX}" "${KV_MINOR_MAX}" || die \
- "Linux ${KV_MAJOR_MAX}.${KV_MINOR_MAX} is the latest supported version"
+ local kv_major_max kv_minor_max zcompat
+ zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
+ kv_major_max="${zcompat%%.*}"
+ zcompat="${zcompat#*.}"
+ kv_minor_max="${zcompat%%.*}"
+ kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
+ "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
fi
check_extra_config