[OE-core] [PATCH] systemd: fix useradd parameter generation

Anders Darander anders at chargestorm.se
Tue Aug 9 05:17:30 UTC 2016


* Enrico Jorns <ejo at pengutronix.de> [160808 15:55]:
> Constructing the USERADD_PARAM_${PN} value with += (as done before)
> resulted in having a whitespace added for each entry not having its
> PACKAGECONFIG parameter activated.

> This is not only a cosmetical issue. The useradd class concatenates all
> useradd commands from all subpackages of a package by doing a
> ";".join(). When having a useradd command that ends with ";" and some
> extra spaces, concatenation will result in an empty useradd argument
> ("commandA;    ;commandB"). The useradd command will be called with this
> and make the Yocto build break by returning an error code.

> Fortunately, there is no problem when having a "commandA;;commandB" in
> the useradd string, this will be ignored. Thus using "_append" instead of
> "+=" is sufficient here.

NAK

Fix useradd.bbclass instead. Otherwise, the same issue will happen with
other recipes. Having a single variable, that you're not allowed to use
the normal way to add to, would be more confusing. Personally, I would
find it hard to rember that I need to use .= for USERADD_PARAM...

Cheers,
Anders

-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB



More information about the Openembedded-core mailing list