Skip to content

useradd.bbclass: fix parse error when only USERADD_DEPENDS is set

Zk47T openembedded-core 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyIn review
  2. v23 patches 1 replySuperseded
  3. v12 patches 1 replySuperseded

Changes in v3 from the cover letter

- Fix usegroup-deponly.bb: remove unnecessary S and UNPACKDIR variables that caused do_unpack to fail on the autobuilder (reported by Mathieu Dubois-Briand)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3useradd.bbclass: allow inheriting with only USERADD_DEPENDS setmeta/classes/useradd.bbclass+5 -00 replies
2/3meta-selftest: add usegroup-deponly recipe to test USERADD_DEPENDS onlymeta-selftest/recipes-test/selftest-users/usegroup-deponly.bb+22 -00 replies
3/3oe-selftest: add test for useradd with only USERADD_DEPENDSmeta/lib/oeqa/selftest/cases/usergrouptests.py+6 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] useradd.bbclass: fix parse error when only USERADD_DEPENDS is set

When a recipe inherits useradd and only sets USERADD_DEPENDS (to depend on users/groups created by another recipe) without creating any users/groups itself, the parse-time sanity check in update_useradd_after_parse() unconditionally throws a fatal error about missing USERADD_PACKAGES.

This series fixes the issue by skipping the USERADD_PACKAGES validation when USERADD_DEPENDS is set, adds a selftest recipe to exercise this code path, and adds an oe-selftest case to verify the build succeeds.

Changes in v3:
- Fix usegroup-deponly.bb: remove unnecessary S and UNPACKDIR variables that caused do_unpack to fail on the autobuilder (reported by Mathieu Dubois-Briand)

Changes in v2:
- Added oe-selftest test case in usergrouptests.py (patch 3/3) as suggested by Ross Burton

Fixes [YOCTO #15863]

Nguyen Minh Tien (3):
useradd.bbclass: allow inheriting with only USERADD_DEPENDS set
meta-selftest: add usegroup-deponly recipe to test USERADD_DEPENDS
only
oe-selftest: add test for useradd with only USERADD_DEPENDS

 .../selftest-users/usegroup-deponly.bb        | 22 +++++++++++++++++++
 meta/classes/useradd.bbclass                  |  5 +++++
 .../lib/oeqa/selftest/cases/usergrouptests.py |  6 +++++
 3 files changed, 33 insertions(+)
 create mode 100644 meta-selftest/recipes-test/selftest-users/usegroup-deponly.bb
Signature · 1 line
2.34.1