diff options
author | Sébastien Mennetrier <smennetrier@voxtok.com> | 2015-05-20 16:48:19 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-24 23:45:22 +0100 |
commit | 5ed1c7f556df3fafd45d493010cc0bbe74d05ebd (patch) | |
tree | 7afa418871a5d581af7fb0f62780938ac6b9c4df /meta/classes/package_rpm.bbclass | |
parent | 9f1ce43fa1bdd3952ccf510cb648ebe9e0e8aac2 (diff) | |
download | openembedded-core-5ed1c7f556df3fafd45d493010cc0bbe74d05ebd.tar.gz openembedded-core-5ed1c7f556df3fafd45d493010cc0bbe74d05ebd.tar.bz2 openembedded-core-5ed1c7f556df3fafd45d493010cc0bbe74d05ebd.zip |
package_rpm.bbclass : escape "%" in files and directories name
The rpm process replace all the "%name" in the spec file by the name of
the package. So, if the package is composed of some files or directories
named "%name...", the rpm package process failed.
Replace all "%" present in files or directories names by "%%%%%%%%" to
correctly escape "%" due to the number of times that % is treated as an
escape character. Jeff Johnson says this is the Right Thing To Do.
[ YOCTO #5397 ]
Signed-off-by: Sébastien Mennetrier <smennetrier@voxtok.com>
Signed-off-by: Michaël Burtin <mburtin@voxtok.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 271b9ae772..8fd068525b 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -196,6 +196,7 @@ python write_specfile () { path = rootpath.replace(walkpath, "") if path.endswith("DEBIAN") or path.endswith("CONTROL"): continue + path = path.replace("%", "%%%%%%%%") # Treat all symlinks to directories as normal files. # os.walk() lists them as directories. @@ -214,6 +215,7 @@ python write_specfile () { for dir in dirs: if dir == "CONTROL" or dir == "DEBIAN": continue + dir = dir.replace("%", "%%%%%%%%") # All packages own the directories their files are in... target.append('%dir "' + path + '/' + dir + '"') else: @@ -227,6 +229,7 @@ python write_specfile () { for file in files: if file == "CONTROL" or file == "DEBIAN": continue + file = file.replace("%", "%%%%%%%%") if conffiles.count(path + '/' + file): target.append('%config "' + path + '/' + file + '"') else: |