From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1090814-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id E1078138334
	for <garchives@archives.gentoo.org>; Fri, 17 May 2019 21:16:09 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BD818E0864;
	Fri, 17 May 2019 21:16:08 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A512BE0864
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 May 2019 21:16:08 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 68F1F3449C5
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 May 2019 21:16:07 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 093685E3
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 May 2019 21:16:05 +0000 (UTC)
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" <gyakovlev@gentoo.org>
Message-ID: <1558127726.5286d0e2a00e995e6aa6e31e6219f713b1d847d9.gyakovlev@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
X-VCS-Directories: sys-fs/zfs-kmod/
X-VCS-Committer: gyakovlev
X-VCS-Committer-Name: Georgy Yakovlev
X-VCS-Revision: 5286d0e2a00e995e6aa6e31e6219f713b1d847d9
X-VCS-Branch: master
Date: Fri, 17 May 2019 21:16:05 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 11b2dfad-5ed0-4acd-ac3f-c1c6fa027745
X-Archives-Hash: b591d4f168d736c91c055dd857953ca8

commit:     5286d0e2a00e995e6aa6e31e6219f713b1d847d9
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri May 17 18:39:39 2019 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri May 17 21:15:26 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5286d0e2

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 <AT> gentoo.org>

 sys-fs/zfs-kmod/zfs-kmod-9999.ebuild | 13 ++++++++-----
 1 file 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 8b0c015bec7..2288b967506 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