[poky] [Image_Creator_Patch 1/1] bitbake/hob: Not display false error msg at hob exit.

Lianhao Lu lianhao.lu at intel.com
Tue Jun 7 00:12:43 PDT 2011


Not display the false error msg "Nothing to do ..." when hob ui exits by
adding a flag of bb.ui.allowNoneAction.

Signed-off-by: Lianhao Lu <lianhao.lu at intel.com>
---
 bitbake/lib/bb/cooker.py      |    4 +++-
 bitbake/lib/bb/ui/__init__.py |    2 ++
 bitbake/lib/bb/ui/hob.py      |    3 +++
 3 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index ac2faa2..584a86d 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -35,6 +35,7 @@ from cStringIO import StringIO
 from contextlib import closing
 import bb
 from bb import utils, data, parse, event, cache, providers, taskdata, command, runqueue
+import bb.ui
 
 logger      = logging.getLogger("BitBake")
 collectlog  = logging.getLogger("BitBake.Collection")
@@ -153,7 +154,8 @@ class BBCooker:
                 self.commandlineAction = ["buildTargets", self.configuration.pkgs_to_build, self.configuration.cmd]
             else:
                 self.commandlineAction = None
-                buildlog.error("Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
+                if not bb.ui.allowNoneAction:
+                    buildlog.error("Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
 
     def runCommands(self, server, data, abort):
         """
diff --git a/bitbake/lib/bb/ui/__init__.py b/bitbake/lib/bb/ui/__init__.py
index a4805ed..518abfc 100644
--- a/bitbake/lib/bb/ui/__init__.py
+++ b/bitbake/lib/bb/ui/__init__.py
@@ -15,3 +15,5 @@
 # You should have received a copy of the GNU General Public License along
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+allowNoneAction = False
\ No newline at end of file
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
index bef3ba2..391bf52 100644
--- a/bitbake/lib/bb/ui/hob.py
+++ b/bitbake/lib/bb/ui/hob.py
@@ -31,6 +31,9 @@ from bb.ui.crumbs.hig import CrumbsDialog
 import xmlrpclib
 import logging
 import Queue
+import bb.ui
+
+bb.ui.allowNoneAction = True
 
 class MainWindow (gtk.Window):
             
-- 
1.7.0.4




More information about the poky mailing list