]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_rpm.bbclass: Add support for filenames with spaces
authorMark Hatle <mark.hatle@windriver.com>
Tue, 17 Jan 2012 15:47:49 +0000 (09:47 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 Jan 2012 16:20:46 +0000 (16:20 +0000)
Files with spaces must be fully quoted in an RPM spec file.  It was
easier to quote all file paths, then to do it selectively.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass

index 2d92efe272bc7f4e98507fe0663eaef0f312314f..bac9de5ad42909107e3464474589cf0b142a7eec 100644 (file)
@@ -543,12 +543,12 @@ python write_specfile () {
                        path = rootpath.replace(walkpath, "")
                        for dir in dirs:
                                # All packages own the directories their files are in...
-                               target.append("%dir " + path + "/" + dir)
+                               target.append('%dir "' + path + '/' + dir + '"')
                        for file in files:
-                               if conffiles.count(path + "/" + file):
-                                       target.append("%config " + path + "/" + file)
+                               if conffiles.count(path + '/' + file):
+                                       target.append('%config "' + path + '/' + file + '"')
                                else:
-                                       target.append(path + "/" + file)
+                                       target.append('"' + path + '/' + file + '"')
 
        # Prevent the prerm/postrm scripts from being run during an upgrade
        def wrap_uninstall(scriptvar):