From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 09D6E1381F3 for ; Mon, 3 Jun 2013 23:35:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7B924E09EB; Mon, 3 Jun 2013 23:35:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0A484E09E0 for ; Mon, 3 Jun 2013 23:35:01 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 23D92335E2B for ; Mon, 3 Jun 2013 23:35:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C408EE545C for ; Mon, 3 Jun 2013 23:34:59 +0000 (UTC) From: "Richard Yao" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Yao" Message-ID: <1362346155.4733b318169415c111d029183c2bc181744b7858.ryao@gentoo> Subject: [gentoo-commits] proj/genkernel:ryao commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_initramfs.sh X-VCS-Directories: / X-VCS-Committer: ryao X-VCS-Committer-Name: Richard Yao X-VCS-Revision: 4733b318169415c111d029183c2bc181744b7858 X-VCS-Branch: ryao Date: Mon, 3 Jun 2013 23:34:59 +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-Archives-Salt: d6bd5e6c-6591-4987-89cc-c1b3e776da6c X-Archives-Hash: 5f447c01a7459b04184d343fae7aa50e commit: 4733b318169415c111d029183c2bc181744b7858 Author: Peter Hjalmarsson rymdraket net> AuthorDate: Sun Mar 3 21:11:26 2013 +0000 Commit: Richard Yao gentoo org> CommitDate: Sun Mar 3 21:29:15 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=4733b318 Unify copy_binaries() more As suggested by Vapier in bug #450688. Signed-off-by: Peter Hjalmarsson rymdraket.net> --- gen_initramfs.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 3ae9d7a..af6dff6 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -34,21 +34,18 @@ copy_binaries() { done # This must be OUTSIDE the for loop, we only want to run lddtree etc ONCE. # lddtree does not have the -V (version) nor the -l (list) options prior to version 1.18 + ( if lddtree -V > /dev/null 2>&1 ; then - lddtree -l "$@" \ - | sort \ - | uniq \ - | cpio -p --make-directories --dereference --quiet "${destdir}" \ - || gen_die "Binary ${f} or some of its library dependencies could not be copied" + lddtree -l "$@" else lddtree "$@" \ | tr ')(' '\n' \ - | awk '/=>/{ if($3 ~ /^\//){print $3}}' \ + | awk '/=>/{ if($3 ~ /^\//){print $3}}' + fi ) \ | sort \ | uniq \ | cpio -p --make-directories --dereference --quiet "${destdir}" \ || gen_die "Binary ${f} or some of its library dependencies could not be copied" - fi } log_future_cpio_content() {