[OE-core] [PATCH 1/4] os-release: use quotation marks

Dan McGregor danismostlikely at gmail.com
Tue Nov 3 22:54:33 UTC 2015


From: Daniel McGregor <daniel.mcgregor at vecima.com>

According to the os-release specification, variable assignments
must be enclosed in double or single quotation marks if they include
spaces, semicolons, or other special characters.

Update the os-release recipe to use always use double quotation marks.

Signed-off-by: Daniel McGregor <daniel.mcgregor at vecima.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')
-- 
2.6.2.11.gb05c2f9




More information about the Openembedded-core mailing list