[oe-commits] [openembedded-core] 07/07: os-release: put double-quotes around variable contents

git at git.openembedded.org git at git.openembedded.org
Fri Mar 11 10:57:40 UTC 2016


rpurdie pushed a commit to branch jethro
in repository openembedded-core.

commit bab590d738e218fb2da2b3bf27933fe4562de870
Author: Craig McQueen <craig.mcqueen at innerrange.com>
AuthorDate: Thu Oct 15 16:13:09 2015 +1100

    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
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    
    (From OE-Core master rev: f6e0ea000fa3b9a726ab56500f643f9902371618)
    Signed-off-by: Joshua Lock <joshua.g.lock at intel.com>
---
 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 c690b82..df19ca2 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')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list