From 5f85a7549d119177c5d39f965b949e957e07867e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 27 Feb 2015 17:19:56 +0000 Subject: buildstats.bbclass: typecast argument to os.minor/os.major to long 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=) File "buildstats.bbclass", line 17, in set_device(e=) 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 Signed-off-by: Ross Burton --- 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 89ae72c679..48442641d4 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 -- cgit 1.2.3-korg