Bug 12721

Summary: USERADD_ERROR_DYNAMIC="error" causes bitbake to fail to parse recipes. ="warn" works. Worked in morty, fails in pyro, rocko, sumo
Product: [Build System, Metadata & Runtime] BitBake Reporter: Sue Wolber <susan_wolber>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, randy.macleod, stephano
Version: unspecified   
Target Milestone: 2.6   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Sue Wolber 2018-04-30 17:18:33 UTC
Originally seen in our custom BSP with 'rocko' meta-* layers and bitbake '1.36'
Reproduced in poky branches pyro, rocko, sumo.
Worked fine in poky branch morty.

Issue seen with bitbake of any image (core-image-minimal, core-image-sato, etc), when you add the following to local.conf:

USERADD_ERROR_DYNAMIC = "error"
USERADDEXTENSION = "useradd-staticids"
USERADD_UID_TABLES = "./passwd"
USERADD_GID_TABLES = "./group"

Per Yocto manual  https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-USERADD_ERROR_DYNAMIC

With or without the files 'group' and 'passwd' actually existing, bitbake will fail to parse random recipes - on poky usually 'dbus' fails, on our custom BSP & custom layers I see failures on seemingly-random recipe names.  

If you change the 
  USERADD_ERROR_DYNAMIC = "error"
to
  USERADD_ERROR_DYNAMIC = "warn"
then bitbake correctly parses recipes and correctly throws warnings about missing userIds and groupIds in the passwd/group files.

But with 
  USERADD_ERROR_DYNAMIC = "error"
bitbake fails to parse recipes.  Eg:

[tso_bldadm@AD.KEYSIGHT.COM@es-hpp-linux-build3 build.pyro]$ bitbake core-image-minimal 
Parsing recipes: 100% |##################################################################################################################################| Time: 0:00:14
Parsing of 831 .bb files complete (0 cached, 831 parsed). 1304 targets, 66 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'dbus' (but /var/lib/jenkins/workspace/manual-poky/poky2/meta/recipes-core/glib-2.0/glib-2.0_2.50.3.bb RDEPENDS on or otherwise requires it)
ERROR: dbus was skipped: dbus - dbus: username messagebus does not have a static ID defined. Skipping it.
NOTE: Runtime target 'dbus' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['dbus']
NOTE: Runtime target 'gnome-desktop-testing' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['gnome-desktop-testing', 'glib-2.0', 'dbus']
NOTE: Runtime target 'shared-mime-info' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['shared-mime-info', 'glib-2.0', 'dbus']
NOTE: Runtime target 'eudev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['eudev', 'glib-2.0', 'dbus']
NOTE: Runtime target 'eudev-dev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['eudev-dev', 'glib-2.0', 'dbus']
NOTE: Runtime target 'udev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['udev', 'glib-2.0', 'dbus']
NOTE: Runtime target 'packagegroup-core-boot' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-core-boot', 'udev', 'glib-2.0', 'dbus']
ERROR: Required build target 'core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal', 'packagegroup-core-boot', 'udev', 'glib-2.0', 'dbus']

Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Comment 1 Sue Wolber 2018-09-19 20:19:21 UTC
Resolving by Submitter as NOT-a-bug.

After chatting with Bootlin (formerly known as Free Electrons) and re-testing...
I was 100% wrong.  I thought with valid 'group' and 'passwd' files, bitbake was throwing parse errors, but I was wrong.
So far as I can tell, with correct 'group' and 'passwd' files, bitbake and OE behave correctly from morty through sumo.
SORRY