Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] psplash: Add mising commands module import.
@ 2012-03-05 22:31 Peter Tworek
  2012-03-05 22:48 ` Paul Eggleton
  2012-03-12 21:12 ` Saul Wold
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Tworek @ 2012-03-05 22:31 UTC (permalink / raw)
  To: openembedded-core

Python commands module is used in the recipe, but never imported.
This leads to build errors like:

NameError: global name 'commands' is not defined

ERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR:   File "do_compile", line 24, in <module>
ERROR:
ERROR:   File "do_compile", line 11, in do_compile
ERROR:
ERROR: The code that was being executed was:
ERROR:      0020:        bb.build.exec_func("oe_runmake", d)
ERROR:      0021:        shutil.copyfile("psplash", outputfile)
ERROR:      0022:
ERROR:      0023:
ERROR:  *** 0024:do_compile(d)
ERROR:      0025:
ERROR: (file: 'do_compile', lineno: 24, function: <module>)
ERROR:      0007:    localfiles = d.getVar('SPLASH_LOCALPATHS', True).split()
ERROR:      0008:    outputfiles = d.getVar('SPLASH_INSTALL', True).split()
ERROR:      0009:    for localfile, outputfile in zip(localfiles, outputfiles):
ERROR:      0010:        if localfile.endswith(".png"):
ERROR:  *** 0011:            outp = commands.getstatusoutput('./make-image-header.sh %s POKY' % localfile)
ERROR:      0012:            print(outp[1])
ERROR:      0013:            fbase = os.path.splitext(os.path.basename(localfile))[0]
ERROR:      0014:            shutil.copyfile("%s-img.h" % fbase, destfile)
ERROR:      0015:        else:

Signed-off-by: Peter Tworek <tworaz666@gmail.com>
---
 meta/recipes-core/psplash/psplash_git.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 42ea615..bd405f9 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -68,7 +68,7 @@ S = "${WORKDIR}/git"
 inherit autotools pkgconfig update-rc.d
 
 python do_compile () {
-    import shutil
+    import shutil, commands
 
     # Build a separate executable for each splash image
     destfile = "%s/psplash-poky-img.h" % d.getVar('S', True)
-- 
1.7.3.4




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

* Re: [PATCH] psplash: Add mising commands module import.
  2012-03-05 22:31 [PATCH] psplash: Add mising commands module import Peter Tworek
@ 2012-03-05 22:48 ` Paul Eggleton
  2012-03-12 21:12 ` Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2012-03-05 22:48 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Monday 05 March 2012 23:31:34 Peter Tworek wrote:
> Python commands module is used in the recipe, but never imported.
> This leads to build errors like:
> 
> NameError: global name 'commands' is not defined
> 
> ERROR: The stack trace of python calls that resulted in this
> exception/failure was: ERROR:   File "do_compile", line 24, in <module>
> ERROR:
> ERROR:   File "do_compile", line 11, in do_compile
> ERROR:
> ERROR: The code that was being executed was:
> ERROR:      0020:        bb.build.exec_func("oe_runmake", d)
> ERROR:      0021:        shutil.copyfile("psplash", outputfile)
> ERROR:      0022:
> ERROR:      0023:
> ERROR:  *** 0024:do_compile(d)
> ERROR:      0025:
> ERROR: (file: 'do_compile', lineno: 24, function: <module>)
> ERROR:      0007:    localfiles = d.getVar('SPLASH_LOCALPATHS',
> True).split() ERROR:      0008:    outputfiles = d.getVar('SPLASH_INSTALL',
> True).split() ERROR:      0009:    for localfile, outputfile in
> zip(localfiles, outputfiles): ERROR:      0010:        if
> localfile.endswith(".png"):
> ERROR:  *** 0011:            outp =
> commands.getstatusoutput('./make-image-header.sh %s POKY' % localfile)
> ERROR:      0012:            print(outp[1])
> ERROR:      0013:            fbase =
> os.path.splitext(os.path.basename(localfile))[0] ERROR:      0014:         
>   shutil.copyfile("%s-img.h" % fbase, destfile) ERROR:      0015:       
> else:
> 
> Signed-off-by: Peter Tworek <tworaz666@gmail.com>
> ---
>  meta/recipes-core/psplash/psplash_git.bb |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/recipes-core/psplash/psplash_git.bb
> b/meta/recipes-core/psplash/psplash_git.bb index 42ea615..bd405f9 100644
> --- a/meta/recipes-core/psplash/psplash_git.bb
> +++ b/meta/recipes-core/psplash/psplash_git.bb
> @@ -68,7 +68,7 @@ S = "${WORKDIR}/git"
>  inherit autotools pkgconfig update-rc.d
> 
>  python do_compile () {
> -    import shutil
> +    import shutil, commands
> 
>      # Build a separate executable for each splash image
>      destfile = "%s/psplash-poky-img.h" % d.getVar('S', True)

Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>

-- 

Paul Eggleton
Intel Open Source Technology Centre



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

* Re: [PATCH] psplash: Add mising commands module import.
  2012-03-05 22:31 [PATCH] psplash: Add mising commands module import Peter Tworek
  2012-03-05 22:48 ` Paul Eggleton
@ 2012-03-12 21:12 ` Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-03-12 21:12 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 03/05/2012 02:31 PM, Peter Tworek wrote:
> Python commands module is used in the recipe, but never imported.
> This leads to build errors like:
>
> NameError: global name 'commands' is not defined
>
> ERROR: The stack trace of python calls that resulted in this exception/failure was:
> ERROR:   File "do_compile", line 24, in<module>
> ERROR:
> ERROR:   File "do_compile", line 11, in do_compile
> ERROR:
> ERROR: The code that was being executed was:
> ERROR:      0020:        bb.build.exec_func("oe_runmake", d)
> ERROR:      0021:        shutil.copyfile("psplash", outputfile)
> ERROR:      0022:
> ERROR:      0023:
> ERROR:  *** 0024:do_compile(d)
> ERROR:      0025:
> ERROR: (file: 'do_compile', lineno: 24, function:<module>)
> ERROR:      0007:    localfiles = d.getVar('SPLASH_LOCALPATHS', True).split()
> ERROR:      0008:    outputfiles = d.getVar('SPLASH_INSTALL', True).split()
> ERROR:      0009:    for localfile, outputfile in zip(localfiles, outputfiles):
> ERROR:      0010:        if localfile.endswith(".png"):
> ERROR:  *** 0011:            outp = commands.getstatusoutput('./make-image-header.sh %s POKY' % localfile)
> ERROR:      0012:            print(outp[1])
> ERROR:      0013:            fbase = os.path.splitext(os.path.basename(localfile))[0]
> ERROR:      0014:            shutil.copyfile("%s-img.h" % fbase, destfile)
> ERROR:      0015:        else:
>
> Signed-off-by: Peter Tworek<tworaz666@gmail.com>
> ---
>   meta/recipes-core/psplash/psplash_git.bb |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
> index 42ea615..bd405f9 100644
> --- a/meta/recipes-core/psplash/psplash_git.bb
> +++ b/meta/recipes-core/psplash/psplash_git.bb
> @@ -68,7 +68,7 @@ S = "${WORKDIR}/git"
>   inherit autotools pkgconfig update-rc.d
>
>   python do_compile () {
> -    import shutil
> +    import shutil, commands
>
>       # Build a separate executable for each splash image
>       destfile = "%s/psplash-poky-img.h" % d.getVar('S', True)
Merged into OE-Core

Thanks 	
	Sau!



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

end of thread, other threads:[~2012-03-12 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-05 22:31 [PATCH] psplash: Add mising commands module import Peter Tworek
2012-03-05 22:48 ` Paul Eggleton
2012-03-12 21:12 ` Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox