runqueue.py: Change failed tasks handling so all failed tasks are reported, not just...
[vuplus_bitbake] / bin / bitbake
index ed05cc7..253ee09 100755 (executable)
@@ -31,7 +31,7 @@ import itertools, optparse
 
 parsespin = itertools.cycle( r'|/-\\' )
 
-__version__ = "1.7.3"
+__version__ = "1.7.4"
 
 #============================================================================#
 # BBStatistics
@@ -539,13 +539,17 @@ class BBCooker:
             except OSError:
                 (filelist, masked) = self.collect_bbfiles()
                 regexp = re.compile(self.configuration.buildfile)
-                matches = 0
+                matches = []
                 for f in filelist:
-                    if regexp.search(f):
+                    if regexp.search(f) and os.path.isfile(f):
                         bf = f
-                        matches = matches + 1
-                if matches != 1:
-                    bb.msg.fatal(bb.msg.domain.Parsing, "Unable to match %s (%s matches found)" % (self.configuration.buildfile, matches))
+                        matches.append(f)
+                if len(matches) != 1:
+                    bb.msg.error(bb.msg.domain.Parsing, "Unable to match %s (%s matches found):" % (self.configuration.buildfile, len(matches)))
+                    for f in matches:
+                        bb.msg.error(bb.msg.domain.Parsing, "    %s" % f)
+                    sys.exit(1)
+                bf = matches[0]                    
 
             bbfile_data = bb.parse.handle(bf, self.configuration.data)
 
@@ -639,10 +643,10 @@ class BBCooker:
             rq.prepare_runqueue(self.configuration.data, self.status, taskdata, runlist)
             try:
                 failures = rq.execute_runqueue(self, self.configuration.data, self.status, taskdata, runlist)
-            except runqueue.TaskFailure, (fnid, fn, taskname):
-                bb.msg.error(bb.msg.domain.Build, "'%s, %s' failed" % (fn, taskname))
+            except runqueue.TaskFailure, fnids:
+                for fnid in fnids:
+                    bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid])
                 sys.exit(1)
-
             bb.event.fire(bb.event.BuildCompleted(buildname, pkgs_to_build, self.configuration.event_data, failures))
 
             sys.exit( self.stats.show() )