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 23BDC138334 for ; Sun, 21 Jul 2019 16:26:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5655AE086F; Sun, 21 Jul 2019 16:26:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 3BDE5E086F for ; Sun, 21 Jul 2019 16:26:42 +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 C17A43483F3 for ; Sun, 21 Jul 2019 16:26:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F203273E for ; Sun, 21 Jul 2019 16:26:37 +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: <1563724912.4ddc6b5da63a9a63acfd958f5b0c2a00cd238c0d.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_determineargs.sh gen_initramfs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 4ddc6b5da63a9a63acfd958f5b0c2a00cd238c0d X-VCS-Branch: master Date: Sun, 21 Jul 2019 16:26:37 +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: 5b8e106c-92dd-4e54-8aa0-374e61d5ac94 X-Archives-Hash: 035f334f8b5ae28d8600c4127390c933 commit: 4ddc6b5da63a9a63acfd958f5b0c2a00cd238c0d Author: Thomas Deutschmann gentoo org> AuthorDate: Sat Jul 20 21:57:48 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Jul 21 16:01:52 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=4ddc6b5d gen_initramfs.sh: create_initramfs(): Move lddtree functional test to determine_real_args() This will allow us to bail out early in case lddtree isn't working. Signed-off-by: Thomas Deutschmann gentoo.org> gen_determineargs.sh | 10 ++++++++++ gen_initramfs.sh | 7 ------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 72741fc..52de7a3 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -517,6 +517,16 @@ determine_real_args() { done unset FEATURE_REQUIRING_BUSYBOX FEATURES_REQUIRING_BUSYBOX fi + + local lddtree_testfile=$(which cpio 2>/dev/null) + if [[ -z "${lddtree_testfile}" || ! -e "${lddtree_testfile}" ]] + then + # This will be fatal because we cpio either way + gen_die "cpio binary not found. Is app-arch/cpio installed?" + elif ! lddtree -l "${lddtree_testfile}" 1>/dev/null 2>&1 + then + gen_die "'lddtree -l ${lddtree_testfile}' failed -- cannot generate initramfs without working lddtree!" + fi fi MICROCODE=${MICROCODE,,} diff --git a/gen_initramfs.sh b/gen_initramfs.sh index c9c1253..08a65e2 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -1526,13 +1526,6 @@ append_data() { } create_initramfs() { - local lddtree_testfile=$(which cpio 2>/dev/null) - if [[ -z "${lddtree_testfile}" || ! -e "${lddtree_testfile}" ]]; then - print_warning 1 "cpio binary not found -- cannot check if lddtree is working!" - elif ! lddtree "${lddtree_testfile}" 1>/dev/null 2>&1; then - gen_die "'lddtree ${lddtree_testfile}' failed -- cannot generate initramfs without working lddtree!" - fi - local compress_ext="" print_info 1 "initramfs: >> Initializing ..."