Gentoo Archives: gentoo-commits

From: Richard Yao <ryao@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:ryao commit in: /
Date: Mon, 03 Jun 2013 23:35:09
Message-Id: 1360446421.6cc7e382d6f5755257bce6f734e8991871dc7b02.ryao@gentoo
1 commit: 6cc7e382d6f5755257bce6f734e8991871dc7b02
2 Author: Peter Hjalmarsson <xake <AT> rymdraket <DOT> net>
3 AuthorDate: Thu Feb 7 12:31:14 2013 +0000
4 Commit: Richard Yao <ryao <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 9 21:47:01 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=6cc7e382
7
8 Make copy_binaries compatible with lddtree from pax-utils-0.6
9
10 On some system the output from the new lddtree does not match with what
11 genkernel expects, however lddtree have insted gained a new option that
12 essentially gives what we want with less code.
13
14 Signed-off-by: Peter Hjalmarsson <xake <AT> rymdraket.net>
15
16 ---
17 gen_initramfs.sh | 11 ++++++++++-
18 1 file changed, 10 insertions(+), 1 deletion(-)
19
20 diff --git a/gen_initramfs.sh b/gen_initramfs.sh
21 index 99bd3f3..3ae9d7a 100755
22 --- a/gen_initramfs.sh
23 +++ b/gen_initramfs.sh
24 @@ -33,13 +33,22 @@ copy_binaries() {
25 fi
26 done
27 # This must be OUTSIDE the for loop, we only want to run lddtree etc ONCE.
28 - lddtree "$@" \
29 + # lddtree does not have the -V (version) nor the -l (list) options prior to version 1.18
30 + if lddtree -V > /dev/null 2>&1 ; then
31 + lddtree -l "$@" \
32 + | sort \
33 + | uniq \
34 + | cpio -p --make-directories --dereference --quiet "${destdir}" \
35 + || gen_die "Binary ${f} or some of its library dependencies could not be copied"
36 + else
37 + lddtree "$@" \
38 | tr ')(' '\n' \
39 | awk '/=>/{ if($3 ~ /^\//){print $3}}' \
40 | sort \
41 | uniq \
42 | cpio -p --make-directories --dereference --quiet "${destdir}" \
43 || gen_die "Binary ${f} or some of its library dependencies could not be copied"
44 + fi
45 }
46
47 log_future_cpio_content() {