From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 294E6138334 for ; Sun, 13 Oct 2019 16:01:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BEBEEE085B; Sun, 13 Oct 2019 16:01:02 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 A85FCE085B for ; Sun, 13 Oct 2019 16:01:02 +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 83C9C34BA06 for ; Sun, 13 Oct 2019 16:01:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 90E33885 for ; Sun, 13 Oct 2019 16:00:58 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1570976332.6b4d839cd9febc3d8e9f4f666512aedab63c870b.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_determineargs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 6b4d839cd9febc3d8e9f4f666512aedab63c870b X-VCS-Branch: master Date: Sun, 13 Oct 2019 16:00:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cf36afc7-7182-42a4-8258-e54391846f2d X-Archives-Hash: 65dc7f3376b0c5a07eaa24ddd1251baf commit: 6b4d839cd9febc3d8e9f4f666512aedab63c870b Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Oct 13 14:18:52 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Oct 13 14:18:52 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6b4d839c gen_determineargs.sh: determine_real_args(): Check early if ZFS is installed This will allow us to error out early if ZFS is missing but was requested. Signed-off-by: Thomas Deutschmann gentoo.org> gen_determineargs.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/gen_determineargs.sh b/gen_determineargs.sh index cf76ee2..dbb61c4 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -749,11 +749,21 @@ determine_real_args() { fi fi - if isTrue "${ZFS}" && isTrue "$(tc-is-cross-compiler)" + if isTrue "${ZFS}" then - local error_msg="Using binpkg for ZFS is not supported." - error_msg+=" Therefore we cannot cross-compile like requested!" - gen_die "${error_msg}" + if isTrue "$(tc-is-cross-compiler)" + then + local error_msg="Using binpkg for ZFS is not supported." + error_msg+=" Therefore we cannot cross-compile like requested!" + gen_die "${error_msg}" + fi + + if [ ! -x "/sbin/zfs" ] + then + local error_msg="'/sbin/zfs' is required for --zfs but file does not exist or is not executable!" + error_msg+=" Is sys-fs/zfs installed?" + gen_die "${error_msg}" + fi fi if isTrue "${MULTIPATH}"