os-release: put double-quotes around variable contents
PATCH 1/1 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(-)
meta/recipes-core/os-release/os-release.bb +1 -1
@@ -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')
Signature · 1 line
2.1.4
I notice this patch hasn't been applied. Is there anything I can do to improve it?
Regards,
Craig McQueen
Quoted 31 lines
-----Original Message-----
From: Craig McQueen
Sent: Thursday, 15 October 2015 4:13 PM
To: [email protected]
Cc: Craig McQueen <[email protected]>
Subject: [PATCH] os-release: put double-quotes around variable contentsThis makes the resulting
/etc/os-releasefile 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(-)meta/recipes- renamed from meta/recipes-core/os-release/os-release.bb +0
-0core/os-release/os-release.bb
index db82760..2fda674 100644meta/recipes-core/os-release/os-release.bb +1
-2@@ -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
Sorry, my mistake--it looks as though it was applied. I was looking at an old local "master" that wasn't updated to upstream master.
Regards,
Craig McQueen
Quoted 54 lines
-----Original Message-----
From: [email protected] [mailto:yocto- [email protected]] On Behalf Of Craig McQueen
Sent: Wednesday, 27 April 2016 1:51 PM
To: [email protected]
Subject: Re: [yocto] [PATCH] os-release: put double-quotes around variable contentsI notice this patch hasn't been applied. Is there anything I can do to improve it?
Regards,
Craig McQueenQuoted 10 lines
-----Original Message-----
From: Craig McQueen
Sent: Thursday, 15 October 2015 4:13 PM
To: [email protected]
Cc: Craig McQueen <[email protected]>
Subject: [PATCH] os-release: put double-quotes around variable contentsThis makes the resulting
/etc/os-releasefile have valid shell assignment syntax. This makes it loadable by a shell script, using the'source' command:
Quoted 21 lines
source
/etc/os-release--- meta/recipes-core/os-release/os-release.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0b/meta/recipes- core/os-release/os-release.bb index db82760..2fda674 100644
meta/recipes-core/os-release/os-release.bb +1
-2@@ -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') --Quoted 1 line
2.1.4
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto