[OE-core] [PATCH] useradd_base: Make perform_groupmems work with native

Fabrice Coulon fabrice.coulon at axis.com
Tue Dec 8 08:50:42 UTC 2015



On 12/07/2015 04:30 PM, Christopher Larson wrote:
>
> On Mon, Dec 7, 2015 at 3:39 AM, Fabrice Coulon 
> <fabrice.coulon at axis.com <mailto:fabrice.coulon at axis.com>> wrote:
>
>     I have a problem when using useradd_base.bbclass together with native.
>     ${sysconfdir} is BUILDDIR/tmp/sysroots/x86_64-linux/etc for native,
>     and ${sysconfdir} is "/etc" for target.
>
>     rootdir is BUILDDIR/tmp/sysroots/x86_64-linux for native, so,
>     $rootdir${sysconfdir} is not correct for native.
>
>     The solution for me was to replace instances of $rootdir${sysconfdir}
>     with $rootdir/etc under perform_groupmems.
>
>     Signed-off-by: Fabrice Coulon <fabrice.coulon at axis.com
>     <mailto:fabrice.coulon at axis.com>>
>
>
> Hardcoding a path is *not* an appropriate fix.

I agree that hardcoding a path is not OK but maybe you should not see 
this as a fix but more like a question/discussion.

The problem is that "/etc" is hardcoded in 13 other places in 
meta/classes/useradd_base.bbclass.

Do you know how to solve this so that it will work well for native?

> -- 
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics




More information about the Openembedded-core mailing list