base-passwd: install passwd and group atomically
authorRobert Yang <liezhi.yang@windriver.com>
Mon, 7 Jul 2014 04:40:37 +0000 (21:40 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 10 Jul 2014 16:38:32 +0000 (17:38 +0100)
commite5005fd0ee17cf5a7e1c04f9a720e99ddbd9e899
treef35adc24ecd88599b28e3e085ba3fa5d501dd5dd
parent2728369aa177de7636a03974bceeb4404a8303dc
base-passwd: install passwd and group atomically

Fixed the race issue:
util-macros.do_package failed: 'getpwnam(): name not found: root'

The error happens when there is a half etc/passwd, fixed by:
$ install usr/share/base-passwd/passwd.master etc/passwd.master
$ mv etc/passwd.master etc/passwd

The "mv" is atomic which will fix this problem.

[YOCTO #6124]

(From OE-Core rev: cdbe55215e3dd1b82a6c147a31c7c40186a8bf80)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/base-passwd/base-passwd_3.5.29.bb