summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-05-22 11:50:37 +0000
committerRichard Purdie <richard@openedhand.com>2007-05-22 11:50:37 +0000
commitd05bcee7f21250854c56fd47b1d5c064ac95efb2 (patch)
tree6941498b4a0bf46d89fe441e91f2c57e59dbc915 /bitbake/lib/bb
parent6e49fdb6db438a947c0122a350cd223dc1ab12db (diff)
downloadpoky-d05bcee7f21250854c56fd47b1d5c064ac95efb2.tar.gz
bitbake: Merge bugfixes from bitbake-1.8 svn
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1759 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/__init__.py2
-rw-r--r--bitbake/lib/bb/cooker.py4
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py6
-rw-r--r--bitbake/lib/bb/runqueue.py8
-rw-r--r--bitbake/lib/bb/taskdata.py6
5 files changed, 16 insertions, 10 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py
index e34122a61e..6ce8e7949a 100644
--- a/bitbake/lib/bb/__init__.py
+++ b/bitbake/lib/bb/__init__.py
@@ -21,7 +21,7 @@
21# with this program; if not, write to the Free Software Foundation, Inc., 21# with this program; if not, write to the Free Software Foundation, Inc.,
22# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 22# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 23
24__version__ = "1.8.1" 24__version__ = "1.8.3"
25 25
26__all__ = [ 26__all__ = [
27 27
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 4b2a906133..1868b268a3 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -26,7 +26,7 @@ import sys, os, getopt, glob, copy, os.path, re, time
26import bb 26import bb
27from bb import utils, data, parse, event, cache, providers, taskdata, runqueue 27from bb import utils, data, parse, event, cache, providers, taskdata, runqueue
28from sets import Set 28from sets import Set
29import itertools 29import itertools, sre_constants
30 30
31parsespin = itertools.cycle( r'|/-\\' ) 31parsespin = itertools.cycle( r'|/-\\' )
32 32
@@ -201,7 +201,7 @@ class BBCooker:
201 fnid = rq.runq_fnid[task] 201 fnid = rq.runq_fnid[task]
202 fn = taskdata.fn_index[fnid] 202 fn = taskdata.fn_index[fnid]
203 pn = self.status.pkg_fn[fn] 203 pn = self.status.pkg_fn[fn]
204 version = self.bb_cache.getVar('PV', fn, True ) + '-' + self.bb_cache.getVar('PR', fn, True) 204 version = "%s:%s-%s" % self.status.pkg_pepvpr[fn]
205 print >> tdepends_file, '"%s.%s" [label="%s %s\\n%s\\n%s"]' % (pn, taskname, pn, taskname, version, fn) 205 print >> tdepends_file, '"%s.%s" [label="%s %s\\n%s\\n%s"]' % (pn, taskname, pn, taskname, version, fn)
206 for dep in rq.runq_depends[task]: 206 for dep in rq.runq_depends[task]:
207 depfn = taskdata.fn_index[rq.runq_fnid[dep]] 207 depfn = taskdata.fn_index[rq.runq_fnid[dep]]
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 2c39316325..20fa60355e 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -72,9 +72,9 @@ def inherit(files, d):
72 if not file in __inherit_cache: 72 if not file in __inherit_cache:
73 bb.msg.debug(2, bb.msg.domain.Parsing, "BB %s:%d: inheriting %s" % (fn, lineno, file)) 73 bb.msg.debug(2, bb.msg.domain.Parsing, "BB %s:%d: inheriting %s" % (fn, lineno, file))
74 __inherit_cache.append( file ) 74 __inherit_cache.append( file )
75 data.setVar('__inherit_cache', __inherit_cache, d)
75 include(fn, file, d, "inherit") 76 include(fn, file, d, "inherit")
76 data.setVar('__inherit_cache', __inherit_cache, d) 77 __inherit_cache = data.getVar('__inherit_cache', d) or []
77
78 78
79def handle(fn, d, include = 0): 79def handle(fn, d, include = 0):
80 global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__ 80 global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__
@@ -377,6 +377,8 @@ def vars_from_file(mypkg, d):
377 myfile = os.path.splitext(os.path.basename(mypkg)) 377 myfile = os.path.splitext(os.path.basename(mypkg))
378 parts = myfile[0].split('_') 378 parts = myfile[0].split('_')
379 __pkgsplit_cache__[mypkg] = parts 379 __pkgsplit_cache__[mypkg] = parts
380 if len(parts) > 3:
381 raise ParseError("Unable to generate default variables from the filename: %s (too many underscores)" % mypkg)
380 exp = 3 - len(parts) 382 exp = 3 - len(parts)
381 tmplist = [] 383 tmplist = []
382 while exp != 0: 384 while exp != 0:
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 059f800b65..83c3ccf882 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -91,6 +91,10 @@ class RunQueue:
91 91
92 taskData = self.taskData 92 taskData = self.taskData
93 93
94 if len(taskData.tasks_name) == 0:
95 # Nothing to do
96 return
97
94 bb.msg.note(1, bb.msg.domain.RunQueue, "Preparing Runqueue") 98 bb.msg.note(1, bb.msg.domain.RunQueue, "Preparing Runqueue")
95 99
96 for task in range(len(taskData.tasks_name)): 100 for task in range(len(taskData.tasks_name)):
@@ -536,8 +540,8 @@ class RunQueue:
536 self.stats.taskFailed() 540 self.stats.taskFailed()
537 del self.build_pids[result[0]] 541 del self.build_pids[result[0]]
538 self.active_builds = self.active_builds - 1 542 self.active_builds = self.active_builds - 1
539 if len(self.failed_fnids) > 0: 543 bb.msg.note(1, bb.msg.domain.RunQueue, "Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and %d failed." % (self.stats.completed, self.stats.skipped, self.stats.failed))
540 return self.failed_fnids 544 return self.failed_fnids
541 except KeyboardInterrupt: 545 except KeyboardInterrupt:
542 bb.msg.note(1, bb.msg.domain.RunQueue, "Sending SIGINT to remaining %s tasks" % self.active_builds) 546 bb.msg.note(1, bb.msg.domain.RunQueue, "Sending SIGINT to remaining %s tasks" % self.active_builds)
543 for k, v in self.build_pids.iteritems(): 547 for k, v in self.build_pids.iteritems():
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index 3d3adfdbda..fdd7848bb7 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -348,7 +348,7 @@ class TaskData:
348 return 348 return
349 349
350 if not item in dataCache.providers: 350 if not item in dataCache.providers:
351 bb.msg.debug(1, bb.msg.domain.Provider, "No providers of build target %s (for %s)" % (item, self.get_dependees_str(item))) 351 bb.msg.note(2, bb.msg.domain.Provider, "No providers of build target %s (for %s)" % (item, self.get_dependees_str(item)))
352 bb.event.fire(bb.event.NoProvider(item, cfgData)) 352 bb.event.fire(bb.event.NoProvider(item, cfgData))
353 raise bb.providers.NoProvider(item) 353 raise bb.providers.NoProvider(item)
354 354
@@ -365,7 +365,7 @@ class TaskData:
365 eligible.remove(p) 365 eligible.remove(p)
366 366
367 if not eligible: 367 if not eligible:
368 bb.msg.debug(1, bb.msg.domain.Provider, "No providers of build target %s after filtering (for %s)" % (item, self.get_dependees_str(item))) 368 bb.msg.note(2, bb.msg.domain.Provider, "No providers of build target %s after filtering (for %s)" % (item, self.get_dependees_str(item)))
369 bb.event.fire(bb.event.NoProvider(item, cfgData)) 369 bb.event.fire(bb.event.NoProvider(item, cfgData))
370 raise bb.providers.NoProvider(item) 370 raise bb.providers.NoProvider(item)
371 371
@@ -503,7 +503,7 @@ class TaskData:
503 Mark a build target as failed (unbuildable) 503 Mark a build target as failed (unbuildable)
504 Trigger removal of any files that have this as a dependency 504 Trigger removal of any files that have this as a dependency
505 """ 505 """
506 bb.msg.debug(1, bb.msg.domain.Provider, "Removing failed build target %s" % self.build_names_index[targetid]) 506 bb.msg.note(2, bb.msg.domain.Provider, "Removing failed build target %s" % self.build_names_index[targetid])
507 self.failed_deps.append(targetid) 507 self.failed_deps.append(targetid)
508 dependees = self.get_dependees(targetid) 508 dependees = self.get_dependees(targetid)
509 for fnid in dependees: 509 for fnid in dependees: