From: Robin H. Johnson Date: Wed, 18 Apr 2012 02:45:05 +0000 (-0700) Subject: lddtree call must be outside the for loop. X-Git-Tag: v3.4.31~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b2caeadca2a792e6b743332a953792cb357485b9;p=genkernel.git lddtree call must be outside the for loop. --- diff --git a/ChangeLog b/ChangeLog index 6ed045a..761a724 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ # Distributed under the GPL v2 # $Id$ + 18 Apr 2012; Robin H. Johnson gen_initramfs.sh: + lddtree call must be outside the for loop. + 16 Apr 2012; Robin H. Johnson gen_initramfs.sh: Use CC0 instead of public domain for copy_binaries to cover French jurisdiction concerns. diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 7db1c95..3739fe6 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -31,15 +31,15 @@ copy_binaries() { if LC_ALL=C lddtree "${binary}" 2>&1 | fgrep -q 'not found'; then gen_die "Binary ${binary} is linked to missing libraries and may need to be re-built" fi - - lddtree "${binary}" \ - | 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" done + # This must be OUTSIDE the for loop, we only want to run lddtree etc ONCE. + 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" } append_base_layout() {