[OE-core] [PATCH] useradd-staticids: don't create username-group if gid is specified
André Draszik
git at andred.net
Tue Sep 5 07:40:40 UTC 2017
On Mon, 2017-09-04 at 10:22 +0000, Peter Kjellerstedt wrote:
> >
[...]
> > diff --git a/meta/classes/useradd-staticids.bbclass
> > b/meta/classes/useradd-staticids.bbclass
> > index ce4ac62ab5..1b61a8bf9b 100644
> > --- a/meta/classes/useradd-staticids.bbclass
> > +++ b/meta/classes/useradd-staticids.bbclass
> > @@ -102,7 +102,7 @@ def update_useradd_static_config(d):
> > # So if the implicit username-group creation is on, then
> > the implicit groupname (LOGIN)
> > # is used, and we disable the user_group option.
> > #
> > - user_group = uaargs.user_group is None or uaargs.user_group
> > is True
> > + user_group = uaargs.gid is None or uaargs.user_group is
> > True
>
> Hmm, I believe that should be:
>
> user_group = uaargs.gid is None and uaargs.user_group is None
> or uaargs.user_group is True
>
> I.e., if neither --gid nor --user-group is specified, then it should
> treat it as if --user-group was specified.
Hm, isn't this still the same as
user_group = uaargs.gid is None or uaargs.user_group is True
? If neither --gid nor --user-group is specified, then gid is None, so it
will do what you want already. IOW, unless the group name (gid) is
specified, a username-group is being created.
Cheers,
Andre'
More information about the Openembedded-core
mailing list