All pastes #944778 Raw Edit

Diff

public text v1 · immutable
·published 2008-03-16 12:39 UTC
rendered paste body
Index: bin/bitbake===================================================================--- bin/bitbake	(revision 1041)+++ bin/bitbake	(working copy)@@ -49,6 +49,7 @@ #============================================================================#  def main():+    return_value = 0     pythonver = sys.version_info     if pythonver[0] < 2 or (pythonver[0] == 2 and pythonver[1] < 5):         print "Sorry, bitbake needs python 2.5 or later."@@ -171,7 +172,7 @@             ncurses.init(frontend, eventHandler)         else:             from bb.ui import knotty-            knotty.init(frontend, eventHandler)+            return_value = knotty.init(frontend, eventHandler)      finally:         # Don't wait for server indefinitely@@ -185,11 +186,13 @@             frontend.system.quit()         except:             pass+        return return_value  if __name__ == "__main__":     print """WARNING, WARNING, WARNING This is a Bitbake from the Unstable/Development 1.9 Branch. This software contains gaping security holes and is dangerous to use! You might want to use the bitbake-1.8 stable branch (if you are not a BitBake developer or tester). I'm going to sleep 5 seconds now to make sure you see that."""     import time     time.sleep(5)-    main()+    exit_status = main()+    sys.exit(exit_status)Index: lib/bb/ui/knotty.py===================================================================--- lib/bb/ui/knotty.py	(revision 1041)+++ lib/bb/ui/knotty.py	(working copy)@@ -39,16 +39,17 @@         cmdline = frontend.runCommand(["getCmdLineAction"])         #print cmdline         if not cmdline:-            return+            return 1         ret = frontend.runCommand(cmdline)         if ret != True:-            print "Couldn't get default commandlind! %s" % ret-            return+            print "Couldn't get default commandline! %s" % ret+            return 1     except xmlrpclib.Fault, x:         print "XMLRPC Fault getting commandline:\n %s" % x-        return+        return 1      shutdown = 0+    return_value = 0     while True:         try:             event = eventHandler.waitEvent(0.25)@@ -71,9 +72,11 @@                 print 'WARNING: ' + event[1]['_message']                 continue             if event[0].startswith('bb.msg.MsgError'):+                return_value = 1                 print 'ERROR: ' + event[1]['_message']                 continue             if event[0].startswith('bb.build.TaskFailed'):+                return_value = 1                 logfile = event[1]['logfile']                 if logfile:                     print "ERROR: Logfile of failure stored in %s." % logfile@@ -120,6 +123,7 @@             if event[0] == 'bb.command.CookerCommandCompleted':                 break             if event[0] == 'bb.command.CookerCommandFailed':+                return_value = 1                 print "Command execution failed: %s" % event[1]['error']                 break             if event[0] == 'bb.cooker.CookerExit':@@ -150,3 +154,4 @@                 frontend.runCommand(["stateShutdown"])             shutdown = shutdown + 1             pass+    return return_value