All of lore.kernel.org
 help / color / mirror / Atom feed
* [extendable-sdk] patch to fix devtool error
@ 2017-03-21 13:16 nitish jha
  2017-03-21 16:48 ` Leonardo Sandoval
  0 siblings, 1 reply; 3+ messages in thread
From: nitish jha @ 2017-03-21 13:16 UTC (permalink / raw)
  To: poky

[-- Attachment #1: Type: text/plain, Size: 2973 bytes --]

Hello All,

While building extendable sdk i found error related to devtool

ERROR: Error executing a python function

The stack trace of python calls that resulted in this exception/failure was:
File: 'copy_buildsystem', lineno: 148, function: <module>
     0144:                                                   sstate_out, d,
     0145:                                                   fixedlsbstring)
     0146:
     0147:
 *** 0148:copy_buildsystem(d)
     0149:
File: 'copy_buildsystem', lineno: 59, function: copy_buildsystem
     0055:        config.write(f)
     0056:
     0057:    # Create a layer for new recipes / appends
     0058:    bbpath = d.getVar('BBPATH', True)
 *** 0059:    bb.process.run(['devtool', '--bbpath', bbpath, '--basepath',
baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath,
'workspace')])
     0060:
     0061:    # Create bblayers.conf
     0062:    bb.utils.mkdirhier(baseoutpath + '/conf')
     0063:    with open(baseoutpath + '/conf/bblayers.conf', 'w') as f:
File: '/home/testuser/CAS/poky/bitbake/lib/bb/process.py', lineno: 155,
function: run
     0151:    else:
     0152:        stdout, stderr = pipe.communicate(input)
     0153:
     0154:    if pipe.returncode != 0:
 *** 0155:        raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
     0156:    return stdout, stderr
Exception: ExecutionError: Execution of 'devtool --bbpath ' failed with
exit code 1:
Traceback (most recent call last):
  File "/home/testuser/CAS/poky/scripts/devtool", line 287, in <module>
    ret = main()
  File "/home/testuser/CAS/poky/scripts/devtool", line 251, in main
    scriptutils.load_plugins(logger, plugins, pluginpath)
  File "/home/testuser/CAS/poky/scripts/lib/scriptutils.py", line 57, in
load_plugins
    plugin = load_plugin(name)
  File "/home/testuser/CAS/poky/scripts/lib/scriptutils.py", line 48, in
load_plugin
    return imp.load_module(name, fp, pathname, description)
  File "/home/testuser/CAS/poky/scripts/lib/devtool/upgrade.py", line 30,
in <module>
    import recipeutils
ImportError: No module named recipeutils


ERROR: Function failed: copy_buildsystem

I found that lib path where devtool expects recipeutils is not correct so I
appended recipeutils path to lib directory path of devtool

patch details are:


*diff --git a/scripts/devtool b/scripts/devtool*
*index 9ac6e79..715d045 100755*
*--- a/scripts/devtool*
*+++ b/scripts/devtool*
*@@ -35,6 +35,9 @@ context = None*
* scripts_path = os.path.dirname(os.path.realpath(__file__))*
* lib_path = scripts_path + '/lib'*
* sys.path = sys.path + [lib_path]*
*+*
*+oe_path = os.path.abspath(os.path.join(scripts_path, "..", "meta",
"lib"))*
*+sys.path.append(oe_path)*
* from devtool import DevtoolError, setup_tinfoil*
* import scriptutils*
* import argparse_oe*
*-- *

Can somebody test and update it in poky.

Thanks and Regards
-- 
*Nitish Jha*

[-- Attachment #2: Type: text/html, Size: 4395 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [extendable-sdk] patch to fix devtool error
  2017-03-21 13:16 [extendable-sdk] patch to fix devtool error nitish jha
@ 2017-03-21 16:48 ` Leonardo Sandoval
  2017-03-26 17:01   ` nitish jha
  0 siblings, 1 reply; 3+ messages in thread
From: Leonardo Sandoval @ 2017-03-21 16:48 UTC (permalink / raw)
  To: nitish jha; +Cc: poky

which branch/commit are you working on? which commands do you execute?
seems that the module pathname is missing and python is not finding it.
By the way, read the poky/README to see how to send the patch to the
mailing list.

Leo


On Tue, 2017-03-21 at 14:16 +0100, nitish jha wrote:
> Hello All,
> 
> 
> While building extendable sdk i found error related to devtool 
> 
> 
> ERROR: Error executing a python function 
> 
> 
> The stack trace of python calls that resulted in this
> exception/failure was:
> File: 'copy_buildsystem', lineno: 148, function: <module>
>      0144:
> sstate_out, d,
>      0145:
> fixedlsbstring)
>      0146:
>      0147:
>  *** 0148:copy_buildsystem(d)
>      0149:
> File: 'copy_buildsystem', lineno: 59, function: copy_buildsystem
>      0055:        config.write(f)
>      0056:
>      0057:    # Create a layer for new recipes / appends
>      0058:    bbpath = d.getVar('BBPATH', True)
>  *** 0059:    bb.process.run(['devtool', '--bbpath', bbpath,
> '--basepath', baseoutpath, 'create-workspace', '--create-only',
> os.path.join(baseoutpath, 'workspace')])
>      0060:
>      0061:    # Create bblayers.conf
>      0062:    bb.utils.mkdirhier(baseoutpath + '/conf')
>      0063:    with open(baseoutpath + '/conf/bblayers.conf', 'w') as
> f:
> File: '/home/testuser/CAS/poky/bitbake/lib/bb/process.py', lineno:
> 155, function: run
>      0151:    else:
>      0152:        stdout, stderr = pipe.communicate(input)
>      0153:
>      0154:    if pipe.returncode != 0:
>  *** 0155:        raise ExecutionError(cmd, pipe.returncode, stdout,
> stderr)
>      0156:    return stdout, stderr
> Exception: ExecutionError: Execution of 'devtool --bbpath ' failed
> with exit code 1:
> Traceback (most recent call last):
>   File "/home/testuser/CAS/poky/scripts/devtool", line 287, in
> <module>
>     ret = main()
>   File "/home/testuser/CAS/poky/scripts/devtool", line 251, in main
>     scriptutils.load_plugins(logger, plugins, pluginpath)
>   File "/home/testuser/CAS/poky/scripts/lib/scriptutils.py", line 57,
> in load_plugins
>     plugin = load_plugin(name)
>   File "/home/testuser/CAS/poky/scripts/lib/scriptutils.py", line 48,
> in load_plugin
>     return imp.load_module(name, fp, pathname, description)
>   File "/home/testuser/CAS/poky/scripts/lib/devtool/upgrade.py", line
> 30, in <module>
>     import recipeutils
> ImportError: No module named recipeutils
> 
> 
> 
> 
> ERROR: Function failed: copy_buildsystem
> 
> 
> I found that lib path where devtool expects recipeutils is not correct
> so I appended recipeutils path to lib directory path of devtool
> 
> 
> patch details are:
> 
> 
> 
> 
> diff --git a/scripts/devtool b/scripts/devtool
> index 9ac6e79..715d045 100755
> --- a/scripts/devtool
> +++ b/scripts/devtool
> @@ -35,6 +35,9 @@ context = None
>  scripts_path = os.path.dirname(os.path.realpath(__file__))
>  lib_path = scripts_path + '/lib'
>  sys.path = sys.path + [lib_path]
> +
> +oe_path = os.path.abspath(os.path.join(scripts_path, "..", "meta",




>  "lib"))
> +sys.path.append(oe_path)
>  from devtool import DevtoolError, setup_tinfoil
>  import scriptutils
>  import argparse_oe
> -- 
> 
> 
> Can somebody test and update it in poky.
> 
> 
> Thanks and Regards
> -- 
> Nitish Jha
> 
> 
> 
> 
> -- 
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [extendable-sdk] patch to fix devtool error
  2017-03-21 16:48 ` Leonardo Sandoval
@ 2017-03-26 17:01   ` nitish jha
  0 siblings, 0 replies; 3+ messages in thread
From: nitish jha @ 2017-03-26 17:01 UTC (permalink / raw)
  To: Leonardo Sandoval; +Cc: poky

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

Hello Leonardo,

I am working on Krogoth master branch, but I have also checked Jethro and
Morty master branch. This Issue persist in those branches too.

Issue detail: I have created a custom layer and I successfully built my
custom image.

command used : bitbake <image_name>
after that I wanted to create extendable_sdk
command used : bitbake <image_name> -c populate_sdk_ext

error description is in above mail, reason I found is, in devtool.py lib
path there is no recipeutils.py. This file is in meta/lib/oe folder
So I added this path in lib path of devtool, which solves the issue and
extendable_sdk created successfully.

I am very new to the process of up-streaming patch to yocto.

So, I would like to get a help on this from somebody to try this and update
the devtool.py in yocto package.

Thanks and Regards

Ntiish Jha

[-- Attachment #2: Type: text/html, Size: 1051 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-26 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-21 13:16 [extendable-sdk] patch to fix devtool error nitish jha
2017-03-21 16:48 ` Leonardo Sandoval
2017-03-26 17:01   ` nitish jha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.