Skip to contentSkip to conversation

package.bbclass: Fix split_and_strip_files when file has single quote (')

PATCH New [email protected] 1 participant 1 message Nov 1, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package.bbclass: Fix split_and_strip_files when file has single quote (')

From: "Felipe F. Tonello" <[email protected]>

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.

---
 meta/classes/package.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package.bbclass +1 -1
index b0f44c7..48bb982 100644
@@ -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
Signature · 1 line
1.8.3.1