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 74268138359 for ; Sun, 2 Aug 2020 22:42:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B0D99E098A; Sun, 2 Aug 2020 22:42:26 +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 7CC66E0999 for ; Sun, 2 Aug 2020 22:42:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 D2A6E34F32C for ; Sun, 2 Aug 2020 22:42:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 87B272CC for ; Sun, 2 Aug 2020 22:42:23 +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: <1596320953.1d4ba1fa03d91a8cef9df6eb43c48d1064264812.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_package.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 1d4ba1fa03d91a8cef9df6eb43c48d1064264812 X-VCS-Branch: master Date: Sun, 2 Aug 2020 22:42:23 +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: 01c2b48e-9468-454e-88de-349b0ccbfbab X-Archives-Hash: 79170f8267191364a181ead158b71600 commit: 1d4ba1fa03d91a8cef9df6eb43c48d1064264812 Author: Thomas Deutschmann gentoo org> AuthorDate: Sat Aug 1 22:29:13 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sat Aug 1 22:29:13 2020 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=1d4ba1fa gen_package.sh: gen_kerncache_extract_kernel(): Create target directory if missing Signed-off-by: Thomas Deutschmann gentoo.org> gen_package.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/gen_package.sh b/gen_package.sh index 271f038..5182d51 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -204,15 +204,18 @@ gen_kerncache_extract_kernel() { } gen_kerncache_extract_modules() { - print_info 1 "Extracting kerncache kernel modules from '${KERNCACHE}' ..." - if [ -n "${INSTALL_MOD_PATH}" ] + local modules_dir=/lib + [ -n "${INSTALL_MOD_PATH}" ] && modules_dir="${INSTALL_MOD_PATH}/lib" + + if [ ! -d "${modules_dir}" ] then - "${TAR_COMMAND}" -xf "${KERNCACHE}" --strip-components 1 -C "${INSTALL_MOD_PATH}"/lib \ - || gen_die "Failed to extract kerncache modules from '${KERNCACHE}' to '${INSTALL_MOD_PATH}/lib'!" - else - "${TAR_COMMAND}" -xf "${KERNCACHE}" --strip-components 1 -C /lib \ - || gen_die "Failed to extract kerncache modules from '${KERNCACHE}' to '${INSTALL_MOD_PATH}/lib'!" + mkdir -p "${modules_dir}" || gen_die "Failed to create '${modules_dir}'!" fi + + print_info 1 "Extracting kerncache kernel modules from '${KERNCACHE}' into '${modules_dir}' ..." + + "${TAR_COMMAND}" -xf "${KERNCACHE}" --strip-components 1 -C "${modules_dir}" \ + || gen_die "Failed to extract kerncache modules from '${KERNCACHE}' to '${modules_dir}'!" } gen_kerncache_extract_config() {