[yocto] [PATCH] os-release: put double-quotes around variable contents

Craig McQueen craig.mcqueen at innerrange.com
Tue Apr 26 20:51:26 PDT 2016


I notice this patch hasn't been applied. Is there anything I can do to improve it?

Regards,
Craig McQueen


> -----Original Message-----
> From: Craig McQueen
> Sent: Thursday, 15 October 2015 4:13 PM
> To: yocto at yoctoproject.org
> Cc: Craig McQueen <craig.mcqueen at innerrange.com>
> Subject: [PATCH] os-release: put double-quotes around variable contents
> 
> This makes the resulting /etc/os-release file have valid shell assignment
> syntax. This makes it loadable by a shell script, using the 'source' command:
> 
>     source /etc/os-release
> ---
>  meta/recipes-core/os-release/os-release.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/os-release/os-release.bb b/meta/recipes-
> core/os-release/os-release.bb
> index db82760..2fda674 100644
> --- a/meta/recipes-core/os-release/os-release.bb
> +++ b/meta/recipes-core/os-release/os-release.bb
> @@ -29,7 +29,7 @@ python do_compile () {
>          for field in d.getVar('OS_RELEASE_FIELDS', True).split():
>              value = d.getVar(field, True)
>              if value:
> -                f.write('{0}={1}\n'.format(field, value))
> +                f.write('{0}="{1}"\n'.format(field, value))
>      if d.getVar('RPM_SIGN_PACKAGES', True) == '1':
>          rpm_gpg_pubkey = d.getVar('RPM_GPG_PUBKEY', True)
>          bb.utils.mkdirhier('${B}/rpm-gpg')
> --
> 2.1.4




More information about the yocto mailing list