]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
Fix exit code display for task failure
authorChris Larson <chris_larson@mentor.com>
Fri, 10 Sep 2010 18:14:54 +0000 (11:14 -0700)
committerChris Larson <chris_larson@mentor.com>
Fri, 10 Sep 2010 18:14:54 +0000 (11:14 -0700)
Per the python documentation, os.waitpid returns the exitcode shifted up by 8
bits, and we weren't compensating, resulting in a display of 'failed with 256'
when a worker process exits with a code of 1.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/runqueue.py

index 8c99c33f35db65c0ecbf3fc5e58b14bbac12ef29..aa9a5f720a942668ff74deea7f537f5011dbef79 100644 (file)
@@ -949,7 +949,8 @@ class RunQueue:
         Called when a task has failed
         Updates the state engine with the failure
         """
-        logger.error("Task %s (%s) failed with %s", task, self.get_user_idstring(task), exitcode)
+        logger.error("Task %s (%s) failed with exit code '%s'", task,
+                     self.get_user_idstring(task), exitcode)
         self.stats.taskFailed()
         fnid = self.runq_fnid[task]
         self.failed_fnids.append(fnid)
@@ -1023,7 +1024,7 @@ class RunQueue:
         self.build_pipes[result[0]].close()
         del self.build_pipes[result[0]]
         if result[1] != 0:
-            failure(task, result[1])
+            failure(task, result[1]>>8)
         else:
             success(task)
             self.stats.taskCompleted()