<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 8, 2016 at 6:37 AM, Enrico Jorns <span dir="ltr"><<a href="mailto:ejo@pengutronix.de" target="_blank">ejo@pengutronix.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":18y" class="a3s aXjCH m1566a6f2a5aae5e0">Constructing the USERADD_PARAM_${PN} value with += (as done before)<br>
resulted in having a whitespace added for each entry not having its<br>
PACKAGECONFIG parameter activated.<br>
<br>
This is not only a cosmetical issue. The useradd class concatenates all<br>
useradd commands from all subpackages of a package by doing a<br>
";".join(). When having a useradd command that ends with ";" and some<br>
extra spaces, concatenation will result in an empty useradd argument<br>
("commandA; ;commandB"). The useradd command will be called with this<br>
and make the Yocto build break by returning an error code.<br>
<br>
Fortunately, there is no problem when having a "commandA;;commandB" in<br>
the useradd string, this will be ignored. Thus using "_append" instead of<br>
"+=" is sufficient here.<br>
<br>
Signed-off-by: Enrico Jorns <<a href="mailto:ejo@pengutronix.de">ejo@pengutronix.de</a>></div></blockquote></div><br>Use .=, not _append. _append is a postponed operation, .= is immediate like += is.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Also, why not make useradd.bbclass sanitize the input / ignore empty entries?<br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>