parsespin = itertools.cycle( r'|/-\\' )
-__version__ = "1.7.0"
+__version__ = "1.7.4"
#============================================================================#
# BBStatistics
except Exception, e:
bb.msg.fatal(bb.msg.domain.Parsing, "%s" % e)
# emit the metadata which isnt valid shell
+ data.expandKeys( self.configuration.data )
for e in self.configuration.data.keys():
if data.getVarFlag( e, 'python', self.configuration.data ):
sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, data.getVar(e, self.configuration.data, 1)))
localdata = data.createCopy(self.configuration.data)
bb.data.update_data(localdata)
+ bb.data.expandKeys(localdata)
def calc_bbfile_priority(filename):
for (regex, pri) in self.status.bbfile_config_priorities:
self.status.possible_world = None
self.status.all_depends = None
- def myProgressCallback( self, x, y, f, bb_cache, from_cache ):
- # feed the status with new input
-
- bb_cache.handle_data(f, self.status)
-
+ def myProgressCallback( self, x, y, f, from_cache ):
+ """Update any tty with the progress change"""
if os.isatty(sys.stdout.fileno()):
sys.stdout.write("\rNOTE: Handling BitBake files: %s (%04d/%04d) [%2d %%]" % ( parsespin.next(), x, y, x*100/y ) )
sys.stdout.flush()
bb.msg.fatal(bb.msg.domain.Parsing, "Sorry, shell not available (%s)" % details )
else:
bb.data.update_data( self.configuration.data )
+ bb.data.expandKeys(localdata)
shell.start( self )
sys.exit( 0 )
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)
bb.event.fire(bb.event.BuildStarted(buildname, pkgs_to_build, self.configuration.event_data))
- taskdata = bb.taskdata.TaskData()
+ localdata = data.createCopy(self.configuration.data)
+ bb.data.update_data(localdata)
+ bb.data.expandKeys(localdata)
+
+ taskdata = bb.taskdata.TaskData(self.configuration.abort)
runlist = []
try:
for k in pkgs_to_build:
- taskdata.add_provider(self.configuration.data, self.status, k)
+ taskdata.add_provider(localdata, self.status, k)
runlist.append([k, "do_%s" % self.configuration.cmd])
- taskdata.add_unresolved(self.configuration.data, self.status)
+ taskdata.add_unresolved(localdata, self.status)
except bb.providers.NoProvider:
sys.exit(1)
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() )
# aof = os.path.join(os.path.dirname(f),aof)
# files.append(aof)
+ self.bb_cache.handle_data(f, self.status)
+
# now inform the caller
if progressCallback is not None:
- progressCallback( i + 1, len( filelist ), f, self.bb_cache, fromCache )
+ progressCallback( i + 1, len( filelist ), f, fromCache )
except IOError, e:
self.bb_cache.remove(f)