[OE-core] [PATCH] package_rpm.bbclass : escape "%" in files and directories name
Paul Eggleton
paul.eggleton at linux.intel.com
Tue Oct 29 16:16:33 UTC 2013
Hi Sébastien,
On Tuesday 29 October 2013 17:09:09 Sébastien Mennetrier wrote:
> Fixes [YOCTO #5397]
>
> 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 "[%]"
>
> Signed-off-by: Sébastien Mennetrier <s.mennetrier at innotis.org>
> ---
> meta/classes/package_rpm.bbclass | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/classes/package_rpm.bbclass
> b/meta/classes/package_rpm.bbclass index 36bad09..6c73e37 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -662,10 +662,13 @@ python write_specfile () {
> def walk_files(walkpath, target, conffiles):
> for rootpath, dirs, files in os.walk(walkpath):
> path = rootpath.replace(walkpath, "")
> + path = path.replace("%", "[%]")
> for dir in dirs:
> + dir = dir.replace("%", "[%]")
> # All packages own the directories their files are in...
> target.append('%dir "' + path + '/' + dir + '"')
> for file in files:
> + file = file.replace("%", "[%]")
> if conffiles.count(path + '/' + file):
> target.append('%config "' + path + '/' + file + '"')
> else:
Are you sure this is correct? The documentation I have been able to dig up via
google seems to suggest that %% is the correct way to escape a % sign in a
spec file.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list