diff options
author | Peter Hjalmarsson <xake@rymdraket.net> | 2013-02-07 13:31:14 +0100 |
---|---|---|
committer | Peter Hjalmarsson <xake@rymdraket.net> | 2013-02-09 22:47:01 +0100 |
commit | 6cc7e382d6f5755257bce6f734e8991871dc7b02 (patch) | |
tree | eae42b23fa3606a0dd1724fdaee0b3b6dfe97563 | |
parent | Fix non-functional init_opts parameter, bug #422471 (diff) | |
download | genkernel-6cc7e382d6f5755257bce6f734e8991871dc7b02.tar.gz genkernel-6cc7e382d6f5755257bce6f734e8991871dc7b02.tar.bz2 genkernel-6cc7e382d6f5755257bce6f734e8991871dc7b02.zip |
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 <xake@rymdraket.net>
-rwxr-xr-x | 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() { |