[OE-core] [PATCH 5/6] buildstats.bbclass: typecast argument to os.minor/os.major to long
Khem Raj
raj.khem at gmail.com
Fri Feb 27 17:19:56 UTC 2015
Started to run into this error on ubuntu 15.04
ERROR: Execution of event handler 'run_buildstats' failed
Traceback (most recent call last):
File "run_buildstats(e)", line 18, in run_buildstats(e=<bb.event.BuildStarted object at 0x7f93341c1b50>)
File "buildstats.bbclass", line 17, in set_device(e=<bb.event.BuildStarted object at 0x7f93341c1b50>)
SystemError: ../Objects/longobject.c:998: bad argument to internal function
ERROR: Command execution failed: Traceback (most recent call last):
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/command.py", line 102, in runAsyncCommand
commandmethod(self.cmds_async, self, options)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/command.py", line 303, in buildTargets
command.cooker.buildTargets(pkgs_to_build, task)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/cooker.py", line 1336, in buildTargets
bb.event.fire(bb.event.BuildStarted(buildname, fulltargetlist), self.data)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/event.py", line 163, in fire
fire_class_handlers(event, d)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/event.py", line 102, in fire_class_handlers
execute_handler(name, handler, event, d)
File "/home/ubuntu/work/bleeding/openembedded-core/bitbake/lib/bb/event.py", line 76, in execute_handler
ret = handler(event)
File "run_buildstats(e)", line 18, in run_buildstats
File "buildstats.bbclass", line 17, in set_device
SystemError: ../Objects/longobject.c:998: bad argument to internal function
similar to here
http://pycuda.2962900.n2.nabble.com/bad-argument-to-internal-function-td4063274.html
If it is right fix .. Dont know
Change-Id: I84f3a4043ad5246e080dfd7e2f066e5292d4af91
Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
meta/classes/buildstats.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 89ae72c..4844264 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -52,8 +52,8 @@ def set_device(e):
# If we end up hitting one of these fs, we'll just skip diskstats collection.
############################################################################
device=os.stat(tmpdir)
- majordev=os.major(device.st_dev)
- minordev=os.minor(device.st_dev)
+ majordev=os.major(long(device.st_dev))
+ minordev=os.minor(long(device.st_dev))
############################################################################
# Bug 1700:
# Because tmpfs/encryptfs/ramfs etc inserts no entry in /proc/diskstats
--
2.1.4
More information about the Openembedded-core
mailing list