package.bbclass: when running 'file', be explicit about the path to the magic
authorTom Rini <tom_rini@mentor.com>
Fri, 19 Feb 2010 08:47:48 +0000 (08:47 +0000)
committerChris Larson <chris_larson@mentor.com>
Fri, 26 Feb 2010 20:06:37 +0000 (13:06 -0700)
This works around one relocation issue.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
classes/package.bbclass

index 062f782..72c9053 100644 (file)
@@ -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)