Skip to contentSkip to conversation

psplash: Add mising commands module import.

PATCH Applied Peter Tworek 3 participants 3 messages Mar 5, 2012 – Mar 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 psplash: Add mising commands module import.

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:
---
 meta/recipes-core/psplash/psplash_git.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-core/psplash/psplash_git.bb +1 -1
index 42ea615..bd405f9 100644
@@ -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)
Signature · 1 line
1.7.3.4
Acked-by on v1 1/1
#1 lore raw
Quoted 41 lines · 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:

---
 meta/recipes-core/psplash/psplash_git.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-core/psplash/psplash_git.bb index 42ea615..bd405f9 100644

meta/recipes-core/psplash/psplash_git.bb S = "${WORKDIR}/git" · line 74

Quoted 8 lines
meta/recipes-core/psplash/psplash_git.bb +1 -1
@@ -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)
Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
Applied
#2 lore raw
In reply to Peter Tworek
Quoted 38 lines · Peter Tworek

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:
---
  meta/recipes-core/psplash/psplash_git.bb |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-core/psplash/psplash_git.bb +0 -0
index 42ea615..bd405f9 100644

meta/recipes-core/psplash/psplash_git.bb S = "${WORKDIR}/git" · line 74

Quoted 8 lines
meta/recipes-core/psplash/psplash_git.bb +1 -1
@@ -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!