From patchwork Tue Jan 17 15:47:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/1] package_rpm.bbclass: Add support for filenames with spaces Date: Tue, 17 Jan 2012 15:47:49 -0000 From: Mark Hatle X-Patchwork-Id: 19587 Message-Id: To: 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 Tested-by: Koen Kooi --- meta/classes/package_rpm.bbclass | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 2d92efe..bac9de5 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -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):