[oe-commits] Tom Rini : package.bbclass: when running 'file', be explicit about the path to the magic

git version control git at git.openembedded.org
Fri Feb 26 22:53:42 UTC 2010


Module: openembedded.git
Branch: shr/unstable
Commit: 1b5e7041ae3b26b7e59c76bd2f2fd72e35492940
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=1b5e7041ae3b26b7e59c76bd2f2fd72e35492940

Author: Tom Rini <tom_rini at mentor.com>
Date:   Fri Feb 19 08:47:48 2010 +0000

package.bbclass: when running 'file', be explicit about the path to the magic

This works around one relocation issue.

Signed-off-by: Tom Rini <tom_rini at mentor.com>
Signed-off-by: Chris Larson <chris_larson at mentor.com>

---

 classes/package.bbclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/classes/package.bbclass b/classes/package.bbclass
index 062f782..72c9053 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -155,11 +155,12 @@ def runstrip(file, d):
     import commands, stat
 
     pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
+    magicfile = "%s/file/magic" % bb.data.getVar('STAGING_DATADIR_NATIVE', d, True) 
 
-    ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
+    ret, result = commands.getstatusoutput("%sfile -m %s '%s'" % (pathprefix, magicfile, file))
 
     if ret:
-        bb.error("runstrip: 'file %s' failed (forced strip)" % file)
+        bb.error("runstrip: 'file -m %s %s' failed (forced strip)" % (magicfile, file))
 
     if "not stripped" not in result:
         bb.debug(1, "runstrip: skip %s" % file)





More information about the Openembedded-commits mailing list