aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2018-05-04 12:31:32 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-08 15:37:10 +0100
commitb6d5729a0f0e6f2c8b36d425a18e9e2ed26f5de0 (patch)
tree0b9cc8092f89bf1cbbf0a970918c1fe298fa164b /meta/classes
parent080f0ee910684beb8bc263d5a45d3aa39b6ee647 (diff)
downloadopenembedded-core-b6d5729a0f0e6f2c8b36d425a18e9e2ed26f5de0.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 Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 5a324e9b2cf6378f8eaa4e394f9cb36d4e2680ac) 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 e68299e10c..2a5d8a5cda 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -901,7 +901,7 @@ python split_and_strip_files () {
# 16 - kernel module
def isELF(path):
type = 0
- ret, result = oe.utils.getstatusoutput("file '%s'" % path)
+ ret, result = oe.utils.getstatusoutput("file -b '%s'" % path)
if ret:
msg = "split_and_strip_files: 'file %s' failed" % path