[OE-core] [PATCH 1/1] useradd.bbclass: use locking of bb.utils to avoid lock race issue of useradd/groupadd

Randy MacLeod randy.macleod at windriver.com
Mon Jul 23 01:56:11 UTC 2012


On 12-07-22 08:10 AM, Huang, j (Jackie) wrote:
>
>
>> On Sun, 2012-07-22 at 14:53 +0800, jackie.huang at windriver.com wrote:
>>> From: Jackie Huang <jackie.huang at windriver.com>
>>>
>>> A race condition can occur when adding users and groups to the
>>> passwd and group files, in [YOCTO #1794], 10 times retry added
>>> but it is not fixed completely.
>>>
>>> This fix re-writes the useradd_preinst and useradd_sysroot with
>>> python and use locking of bb.utils to lock the passwd and group
>>> files before executing useradd/groupadd commands to avoid the
>>> lock race themselves.
>>>
>>> [YOCTO #2779]
>>>
>>> Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
>>> ---
>>>   meta/classes/useradd.bbclass |  284 ++++++++++++++++++------------------------
>>>   1 files changed, 124 insertions(+), 160 deletions(-)
>>
>> Please resend this with the whitespace issues resolved. Its near
>> impossible to review as it stands :(
>
> Re-sent, sorry about that.

Hi Jackie,

I don't see that your new version sent at 8:01 is any better
but I could be wrong...

Robert,
Please take a look and help Jackie with formatting
and perhaps small single purpose commits as needed -
i.e. separate the whitespace changes from the functional changes.

This problem is happening frequently so I'd like to get this
worked out upstream.

Thanks,
// Randy


>
> Thanks,
> Jackie
>
>>
>> Cheers,
>>
>> Richard
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>


-- 
# Randy MacLeod. MTS, Linux, Wind River
Direct: 613.963.1350




More information about the Openembedded-core mailing list