Bug 4486 - Traceback when inheriting useradd but not setting USERADD_PARAM or GROUPADD_PARAM
Summary: Traceback when inheriting useradd but not setting USERADD_PARAM or GROUPADD_P...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.5
Hardware: All Multiple
: Medium normal
Target Milestone: 1.5
Assignee: Ionut Radu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-05-10 15:46 UTC by Paul Eggleton
Modified: 2013-08-05 09:46 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: New (Never tested)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2013-05-10 15:46:57 UTC
If you inherit useradd and add a package to USERADD_PACKAGES but don't set USERADD_PARAM or GROUPADD_PARAM, you get this:

--------- snip ----------
ERROR: Unable to parse /home/paul/poky/meta-oe/meta-oe/recipes-support/mysql/mysql5_5.1.40.bb                                                                                 | ETA:  --:--:--
Traceback (most recent call last):
  File "/home/paul/poky/poky/bitbake/lib/bb/parse/ast.py", line 335, in finalize(fn='/home/paul/poky/meta-oe/meta-oe/recipes-support/mysql/mysql5_5.1.40.bb', d=<bb.data_smart.DataSmart object at 0x152f910>, variant=None):
             code.append("%s(d)" % funcname)
    >    bb.utils.better_exec("\n".join(code), {"d": d})
         bb.data.update_data(d)
  File "/home/paul/poky/poky/bitbake/lib/bb/utils.py", line 343, in better_exec(code=<code object <module> at 0xfa0ad50, file "<code>", line 1>, context={'d': <bb.data_smart.DataSmart object at 0x152f910>}, text='__anon_635__home_paul_poky_poky_meta_classes_base_bbclass(d)\n__anon_227__home_paul_poky_poky_meta_classes_package_bbclass(d)\n__anon_1134__home_paul_poky_poky_meta_classes_package_rpm_bbclass(d)\n__anon_917__home_paul_poky_poky_meta_classes_insane_bbclass(d)\n__anon_20__home_paul_poky_poky_meta_classes_debian_bbclass(d)\n__anon_27__home_paul_poky_poky_meta_classes_devshell_bbclass(d)\n__anon_76__home_paul_poky_poky_meta_classes_sstate_bbclass(d)\n__anon_124__home_paul_poky_poky_meta_classes_siteinfo_bbclass(d)\n__anon_53__home_paul_poky_poky_meta_classes_update_rc_d_bbclass(d)\n__anon_168__home_paul_poky_poky_meta_classes_useradd_bbclass(d)', realfile='<code>'):
         try:
    >        exec(code, _context, context)
         except Exception as e:
  File "<code>", line 10, in <module>
  File "__anon_168__home_paul_poky_poky_meta_classes_useradd_bbclass", line 2, in __anon_168__home_paul_poky_poky_meta_classes_useradd_bbclass(d=<bb.data_smart.DataSmart object at 0x152f910>)
  File "useradd.bbclass", line 9, in update_useradd_after_parse(d=<bb.data_smart.DataSmart object at 0x152f910>)
FuncFailed: Function failed: /home/paul/poky/meta-oe/meta-oe/recipes-support/mysql/mysql5_5.1.40.bb inherits useradd but doesn't set USERADD_PARAM or GROUPADD_PARAM for package mysql5-server
--------- snip ----------

We only need to see the error here and not the traceback which is rather difficult to read. It could be that raising bb.build.FuncFailed is the wrong thing to be doing here.
Comment 1 Ionut Radu 2013-07-18 12:54:25 UTC
I replaced bb.build.FuncFailed with bb.fatal
Comment 2 Paul Eggleton 2013-07-18 13:09:53 UTC
OK, but the patch hasn't been merged to master yet, so this bug needs to remain open until it has been.