]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Fix split_and_strip_files when file has single quote (')
authorFelipe F. Tonello <eu@felipetonello.com>
Fri, 1 Nov 2013 03:51:51 +0000 (20:51 -0700)
committerSaul Wold <sgw@linux.intel.com>
Mon, 4 Nov 2013 18:01:17 +0000 (10:01 -0800)
Fix false error report when a file that has a single quote by escaping
the single quote. Some packages might install files with quotes, such
as music files and other types, that will cause the problem.

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/package.bbclass

index b0f44c7fafe3983470b338570399f3ce3357a458..48bb9828f5aff42eb737ede6d5767a1ab44269ba 100644 (file)
@@ -747,7 +747,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 \"%s\"" % path.replace("\"", "\\\""))
 
         if ret:
             msg = "split_and_strip_files: 'file %s' failed" % path