From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-566665-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B0A4D198005 for <garchives@archives.gentoo.org>; Sun, 3 Mar 2013 20:31:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4FCEDE05DB; Sun, 3 Mar 2013 20:31:47 +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 D626BE05DB for <gentoo-commits@lists.gentoo.org>; Sun, 3 Mar 2013 20:31:46 +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 AA21433DC32 for <gentoo-commits@lists.gentoo.org>; Sun, 3 Mar 2013 20:31:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 42581E4073 for <gentoo-commits@lists.gentoo.org>; Sun, 3 Mar 2013 20:31:44 +0000 (UTC) From: "Peter Hjalmarsson" <xake@rymdraket.net> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Peter Hjalmarsson" <xake@rymdraket.net> Message-ID: <1362346155.4733b318169415c111d029183c2bc181744b7858.xake@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: xake X-VCS-Committer-Name: Peter Hjalmarsson X-VCS-Revision: 4733b318169415c111d029183c2bc181744b7858 X-VCS-Branch: master Date: Sun, 3 Mar 2013 20:31:44 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 21d1dc6b-dbf6-4336-9664-9bb94cf84aba X-Archives-Hash: 066f5e0a0da691020692d0855b69c230 commit: 4733b318169415c111d029183c2bc181744b7858 Author: Peter Hjalmarsson <xake <AT> rymdraket <DOT> net> AuthorDate: Sun Mar 3 21:11:26 2013 +0000 Commit: Peter Hjalmarsson <xake <AT> rymdraket <DOT> net> 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 <xake <AT> rymdraket.net> --- gen_initramfs.sh | 11 ++++------- 1 files 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() {