]> code.ossystems Code Review - openembedded-core.git/commitdiff
cooker: bail out early if no files to build
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 1 Mar 2010 08:20:29 +0000 (09:20 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 22 Mar 2010 15:03:46 +0000 (15:03 +0000)
This prevents a misleading backtrace:
ERROR: no files to build.
Command execution failed: Traceback (most recent call last):
  File ".../bitbake/build/lib/bb/command.py", line 83, in runAsyncCommand
    self.cooker.updateCache()
  File ".../bitbake/build/lib/bb/cooker.py", line 779, in updateCache
    if not self.parser.parse_next():
  File ".../bitbake/build/lib/bb/cooker.py", line 969, in parse_next
    cooker.bb_cache.sync()
UnboundLocalError: local variable 'cooker' referenced before assignment

(Bitbake rev: 060ef3d957615b7eb1209dc0d01ebeb53f8c4edc)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/cooker.py

index 938bdeaaea55cca44522833398dd5d076b9d1dbf..bf174859cb05a918961a45a556ac9d5f7dcd122a 100644 (file)
@@ -832,7 +832,8 @@ class BBCooker:
             files = self.get_bbfiles()
 
         if not len(files):
-            bb.msg.error(bb.msg.domain.Collection, "no files to build.")
+            bb.msg.error(bb.msg.domain.Collection, "no recipe files to build, check your BBPATH and BBFILES?")
+            bb.event.fire(CookerExit(), self.configuration.event_data)
 
         newfiles = []
         for f in files: