Patchwork [1/1] fix traceback when inheriting useradd but not setting USERADD_PARAM or GROUPADD_PARAM (FuncFailed replaced by bb.fatal)

login
register
mail settings
Submitter Ionut Radu
Date July 18, 2013, 12:54 p.m.
Message ID <f0a9a68c227e86bd6239936a06d27129bf1e82f1.1374151585.git.ionutx.radu@intel.com>
Download mbox | patch
Permalink /patch/53955/
State Accepted
Commit 3e3ab8e02da7f56a87759acbb3e51ccb76448854
Headers show

Comments

Ionut Radu - July 18, 2013, 12:54 p.m.
Signed-off-by: Ionut Radu <ionutx.radu@intel.com>
---
 meta/classes/useradd.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Saul Wold - July 18, 2013, 10:47 p.m.
Please fix the commit message to follow the guildlines:

http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

Thanks
	Sau!

On 07/18/2013 05:54 AM, Ionut Radu wrote:
> Signed-off-by: Ionut Radu <ionutx.radu@intel.com>
> ---
>   meta/classes/useradd.bbclass |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
> index 3fe011d..a68b6fd 100644
> --- a/meta/classes/useradd.bbclass
> +++ b/meta/classes/useradd.bbclass
> @@ -219,7 +219,7 @@ def update_useradd_after_parse(d):
>
>       for pkg in useradd_packages.split():
>           if not d.getVar('USERADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPMEMS_PARAM_%s' % pkg, True):
> -            raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE'), pkg))
> +            bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE'), pkg))
>
>   python __anonymous() {
>       update_useradd_after_parse(d)
>

Patch

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 3fe011d..a68b6fd 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -219,7 +219,7 @@  def update_useradd_after_parse(d):
 
     for pkg in useradd_packages.split():
         if not d.getVar('USERADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPMEMS_PARAM_%s' % pkg, True):
-            raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE'), pkg))
+            bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE'), pkg))
 
 python __anonymous() {
     update_useradd_after_parse(d)