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 4C78F138336 for ; Sun, 14 Jul 2019 13:00:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5614BE0893; Sun, 14 Jul 2019 13:00:36 +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 32D4FE0893 for ; Sun, 14 Jul 2019 13:00:35 +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 97FE2347A91 for ; Sun, 14 Jul 2019 13:00:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A32CA6FE for ; Sun, 14 Jul 2019 13:00:29 +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: <1563105496.d4450fcaad41aff9b2d5a693df80560890730dc1.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_initramfs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: d4450fcaad41aff9b2d5a693df80560890730dc1 X-VCS-Branch: master Date: Sun, 14 Jul 2019 13:00:29 +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: 67b1c929-30bd-4d40-9f51-555d8f6cc676 X-Archives-Hash: 9559f4e1f14858a9d17a143da31fe07c commit: d4450fcaad41aff9b2d5a693df80560890730dc1 Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Jul 14 09:36:51 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Jul 14 11:58:16 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=d4450fca gen_initramfs.sh: Refactor append_libgcc_s() Signed-off-by: Thomas Deutschmann gentoo.org> gen_initramfs.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index c7fd1dc..8d6996e 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -613,12 +613,14 @@ append_btrfs() { } append_libgcc_s() { - if [ -d "${TEMP}/initramfs-libgcc_s-temp" ] + local TDIR="${TEMP}/initramfs-libgcc_s-temp" + if [ -d "${TDIR}" ] then - rm -r "${TEMP}/initramfs-libgcc_s-temp" + rm -r "${TDIR}" || gen_die "Failed to clean out existing '${TDIR}'!" fi - mkdir -p "${TEMP}/initramfs-libgcc_s-temp" + mkdir "${TDIR}" || gen_die "Failed to create '${TDIR}'!" + cd "${TDIR}" || gen_die "Failed to chdir to '${TDIR}'!" # Include libgcc_s.so.1: # - workaround for zfsonlinux/zfs#4749 @@ -631,17 +633,12 @@ append_libgcc_s() { libgccpath="/usr/lib/gcc/*/*/libgcc_s.so.1" fi - # Copy binaries - copy_binaries "${TEMP}/initramfs-libgcc_s-temp" ${libgccpath} - cd "${TEMP}/initramfs-libgcc_s-temp/lib64" - ln -s "..${libgccpath}" + copy_binaries "${TDIR}" ${libgccpath} - cd "${TEMP}/initramfs-libgcc_s-temp/" + cd "${TDIR}" || gen_die "Failed to chdir to '${TDIR}'!" log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ - || gen_die "compressing libgcc_s cpio" - cd "${TEMP}" - rm -rf "${TEMP}/initramfs-libgcc_s-temp" > /dev/null + || gen_die "Failed to append libgcc_s to cpio!" } append_linker() {