]> code.ossystems Code Review - openembedded-core.git/commitdiff
populate_sdk: verify executable or dynamically linked library
authoryzhu1 <yanjun.zhu@windriver.com>
Tue, 26 Nov 2013 08:38:28 +0000 (08:38 +0000)
committerRobert Yang <liezhi.yang@windriver.com>
Sun, 26 Jan 2014 06:08:14 +0000 (14:08 +0800)
When toolchain directory is changed to execute mode, some non-executable
files or empty files are sorted. This will result in some errors. Thus when
sorting executable files or dynamically linked library, additional conditions
are to exclude non-executable files or empty files.

(From OE-Core master rev: c9d56308bfa9ee7f4a9b22eae86390626ddc1c35)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/classes/populate_sdk_base.bbclass

index b7ea85159c05b4a36c39e6bf9c0b6224b5787b84..29890e38c9e5fcf3959893e71a9f8f13bbccf68b 100644 (file)
@@ -253,7 +253,7 @@ if [ "$dl_path" = "" ] ; then
        echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
        exit 1
 fi
-executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111)
+executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111 -exec file '{}' \;| grep "\(executable\|dynamically linked\)" | cut -f 1 -d ':') 
 
 tdir=`mktemp -d`
 if [ x$tdir = x ] ; then