[OE-core] [PATCH] package.bbclass: Fix split_and_strip_files when file has single quote (')

Felipe Ferreri Tonello eu at felipetonello.com
Fri Nov 1 03:11:51 UTC 2013


On 10/31/2013 07:25 PM, eu at felipetonello.com wrote:
> From: "Felipe F. Tonello" <eu at felipetonello.com>
>
> 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.
>
> Signed-off-by: Felipe F. Tonello <eu at felipetonello.com>
> ---
>   meta/classes/package.bbclass | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index b0f44c7..a12b7b7 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -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
>


I just found a bug in this implementation. I will send a v2 shortly.

Felipe



More information about the Openembedded-core mailing list