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 8EB4813894D for ; Sat, 9 Feb 2013 21:47:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1FCD4E0652; Sat, 9 Feb 2013 21:47:44 +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 B3D8BE0652 for ; Sat, 9 Feb 2013 21:47:43 +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 88C6333E3B3 for ; Sat, 9 Feb 2013 21:47:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 258CBE4073 for ; Sat, 9 Feb 2013 21:47:41 +0000 (UTC) From: "Peter Hjalmarsson" 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" Message-ID: <1360446421.6cc7e382d6f5755257bce6f734e8991871dc7b02.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: 6cc7e382d6f5755257bce6f734e8991871dc7b02 X-VCS-Branch: master Date: Sat, 9 Feb 2013 21:47:41 +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: aaa3c175-2a33-45b9-923e-b21875a15bbf X-Archives-Hash: 8964832e65970f8597d863b91ade9ae7 commit: 6cc7e382d6f5755257bce6f734e8991871dc7b02 Author: Peter Hjalmarsson rymdraket net> AuthorDate: Thu Feb 7 12:31:14 2013 +0000 Commit: Peter Hjalmarsson rymdraket net> CommitDate: Sat Feb 9 21:47:01 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=6cc7e382 Make copy_binaries compatible with lddtree from pax-utils-0.6 On some system the output from the new lddtree does not match with what genkernel expects, however lddtree have insted gained a new option that essentially gives what we want with less code. Signed-off-by: Peter Hjalmarsson rymdraket.net> --- gen_initramfs.sh | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 99bd3f3..3ae9d7a 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -33,13 +33,22 @@ copy_binaries() { fi done # This must be OUTSIDE the for loop, we only want to run lddtree etc ONCE. - lddtree "$@" \ + # 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" + else + lddtree "$@" \ | tr ')(' '\n' \ | awk '/=>/{ if($3 ~ /^\//){print $3}}' \ | 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() {