]> code.ossystems Code Review - openembedded-core.git/commit
useradd.bbclass: Strip trailing ';' in cmd params
authorKhem Raj <raj.khem@gmail.com>
Wed, 18 May 2016 04:20:15 +0000 (21:20 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 May 2016 21:31:33 +0000 (22:31 +0100)
commite8d4356c38e3c2aacd6dc49231c73bcb7d597308
tree10de00a799c2c7a7b9e48541c0f025678bec5065
parentf6b0dd13ac90bb431bb51e0cbf1681a4d9fbea14
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@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/useradd.bbclass