[oe-commits] [openembedded-core] 30/36: useradd.bbclass: Strip trailing '; ' in cmd params
git at git.openembedded.org
git at git.openembedded.org
Wed May 18 22:25:26 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 187a0b80d23ec7e3589178e6e29d6c90313cf3c4
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Tue May 17 21:40:20 2016 -0700
useradd.bbclass: Strip trailing '; ' in cmd params
When there are more than 1 packages in a recipe requiring useradd
services, they are concatnated and a ';' is inserted just after
each of the users being added by the packages. A situation arises
in cases where this is controlled by PACKAGECONFIG then we add a
';' separator in the USERADD_PARAM value itself for each packagecofig
since we do not know which one will be picked, we end up in situation
where the final string returned from get_all_cmd_params() appears to be
a; ; b; c;
and then the logic which uses these cmds triggers with ';' as separator
but in this case it will fail after executing useradd 'a' because the next
cmd it will call will be just a whitespace
This is highlighted by the systemd patch to add more users as needed
by systemd 229 components.
Signed-off-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/useradd.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 8283bf3..28251a2 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -203,7 +203,7 @@ def get_all_cmd_params(d, cmd_type):
for pkg in useradd_packages.split():
param = d.getVar(param_type % pkg, True)
if param:
- params.append(param)
+ params.append(param.rstrip(" ;"))
return "; ".join(params)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list