[OE-core] [PATCH 1/5] useradd.bbclass: Strip trailing '; ' in cmd params

Patrick Ohly patrick.ohly at intel.com
Mon May 23 08:07:53 UTC 2016


On Wed, 2016-05-18 at 12:38 -0700, Khem Raj wrote:
> This fix was not sufficient and there has to be extra fix done to also
> consider the case
> when sysroot is created during image build time. I have updated it in
> pull request here
> 
> http://git.openembedded.org/openembedded-core-contrib/commit/?h=kraj/pu&id=642c6cf0b6a0371de476513162bd0cefa9c438b3

That now fails for cases where the USERADD_PARAM ends in trailing white
space after the last valid opts. The reason is that the 'if test "x
$opts" = "x$remaining"; then break; fi' check does not get triggered
anymore, because $remaining has the trailing white space whereas "$opts"
does not.

I'm not sure what the best approach is in this case. Perhaps also strip
trailing whitespace from all assignments to $remaining?

The case were we see this is:
USERADD_PARAM_iot-rest-api-server="--system --home /var/lib/empty --no-create-home --shell /bin/false --gid restful restful "

The build then hangs because the useradd preinst loops forever.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.






More information about the Openembedded-core mailing list