summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2018-04-16 11:34:18 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-18 18:57:06 +0100
commit49bfeb0a9c5aaa7226d6fba4f111bf77d23c771c (patch)
tree8cb791804c57ed940d8e71cb48cf10ba66c1584e /meta/classes
parent5514c292ea036e75f5cd8ffd409eba4709f19be6 (diff)
downloadpoky-49bfeb0a9c5aaa7226d6fba4f111bf77d23c771c.tar.gz
package.bbclass: Add '-b' option to file call in isELF
The isELF function works by running: result = file <pathname> if 'ELF' in result By default 'file' will prepend the result with the path name of the file that is being checked. This usually works fine, such as: $ file /home/foo/openembedded-core/meta/classes/package.bbclass /home/foo/openembedded-core/meta/classes/package.bbclass: Python script, ASCII text executable, with very long lines However, if the path includes 'ELF', ELF will end up in the result, and then the check will return positive. $ file /home/ELF/openembedded-core/meta/classes/package.bbclass /home/ELF/openembedded-core/meta/classes/package.bbclass: Python script, ASCII text executable, with very long lines This will then result in the isELF coming back true, and possibly causing the checks that use isELF, such as the 'is it already stripped' check, to do the incorrect thing. Adding the '-b' option to file will result in the path being omitted in the result: $ file /home/ELF/openembedded-core/meta/classes/package.bbclass Python script, ASCII text executable, with very long lines (From OE-Core rev: 5a324e9b2cf6378f8eaa4e394f9cb36d4e2680ac) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 9bba021efb..79783071bc 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -918,7 +918,7 @@ python split_and_strip_files () {
918 # 16 - kernel module 918 # 16 - kernel module
919 def isELF(path): 919 def isELF(path):
920 type = 0 920 type = 0
921 ret, result = oe.utils.getstatusoutput("file '%s'" % path) 921 ret, result = oe.utils.getstatusoutput("file -b '%s'" % path)
922 922
923 if ret: 923 if ret:
924 msg = "split_and_strip_files: 'file %s' failed" % path 924 msg = "split_and_strip_files: 'file %s' failed" % path