diff options
Diffstat (limited to 'bitbake/lib/bb/taskdata.py')
| -rw-r--r-- | bitbake/lib/bb/taskdata.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py index 0ea6c0bfd6..94e822c485 100644 --- a/bitbake/lib/bb/taskdata.py +++ b/bitbake/lib/bb/taskdata.py | |||
| @@ -70,6 +70,8 @@ class TaskData: | |||
| 70 | 70 | ||
| 71 | self.skiplist = skiplist | 71 | self.skiplist = skiplist |
| 72 | 72 | ||
| 73 | self.mcdepends = [] | ||
| 74 | |||
| 73 | def add_tasks(self, fn, dataCache): | 75 | def add_tasks(self, fn, dataCache): |
| 74 | """ | 76 | """ |
| 75 | Add tasks for a given fn to the database | 77 | Add tasks for a given fn to the database |
| @@ -88,6 +90,13 @@ class TaskData: | |||
| 88 | 90 | ||
| 89 | self.add_extra_deps(fn, dataCache) | 91 | self.add_extra_deps(fn, dataCache) |
| 90 | 92 | ||
| 93 | def add_mcdepends(task): | ||
| 94 | for dep in task_deps['mcdepends'][task].split(): | ||
| 95 | if len(dep.split(':')) != 5: | ||
| 96 | bb.msg.fatal("TaskData", "Error for %s:%s[%s], multiconfig dependency %s does not contain exactly four ':' characters.\n Task '%s' should be specified in the form 'multiconfig:fromMC:toMC:packagename:task'" % (fn, task, 'mcdepends', dep, 'mcdepends')) | ||
| 97 | if dep not in self.mcdepends: | ||
| 98 | self.mcdepends.append(dep) | ||
| 99 | |||
| 91 | # Common code for dep_name/depends = 'depends'/idepends and 'rdepends'/irdepends | 100 | # Common code for dep_name/depends = 'depends'/idepends and 'rdepends'/irdepends |
| 92 | def handle_deps(task, dep_name, depends, seen): | 101 | def handle_deps(task, dep_name, depends, seen): |
| 93 | if dep_name in task_deps and task in task_deps[dep_name]: | 102 | if dep_name in task_deps and task in task_deps[dep_name]: |
| @@ -110,16 +119,20 @@ class TaskData: | |||
| 110 | parentids = [] | 119 | parentids = [] |
| 111 | for dep in task_deps['parents'][task]: | 120 | for dep in task_deps['parents'][task]: |
| 112 | if dep not in task_deps['tasks']: | 121 | if dep not in task_deps['tasks']: |
| 113 | bb.debug(2, "Not adding dependeny of %s on %s since %s does not exist" % (task, dep, dep)) | 122 | bb.debug(2, "Not adding dependency of %s on %s since %s does not exist" % (task, dep, dep)) |
| 114 | continue | 123 | continue |
| 115 | parentid = "%s:%s" % (fn, dep) | 124 | parentid = "%s:%s" % (fn, dep) |
| 116 | parentids.append(parentid) | 125 | parentids.append(parentid) |
| 117 | self.taskentries[tid].tdepends.extend(parentids) | 126 | self.taskentries[tid].tdepends.extend(parentids) |
| 118 | 127 | ||
| 128 | |||
| 119 | # Touch all intertask dependencies | 129 | # Touch all intertask dependencies |
| 120 | handle_deps(task, 'depends', self.taskentries[tid].idepends, self.seen_build_target) | 130 | handle_deps(task, 'depends', self.taskentries[tid].idepends, self.seen_build_target) |
| 121 | handle_deps(task, 'rdepends', self.taskentries[tid].irdepends, self.seen_run_target) | 131 | handle_deps(task, 'rdepends', self.taskentries[tid].irdepends, self.seen_run_target) |
| 122 | 132 | ||
| 133 | if 'mcdepends' in task_deps and task in task_deps['mcdepends']: | ||
| 134 | add_mcdepends(task) | ||
| 135 | |||
| 123 | # Work out build dependencies | 136 | # Work out build dependencies |
| 124 | if not fn in self.depids: | 137 | if not fn in self.depids: |
| 125 | dependids = set() | 138 | dependids = set() |
| @@ -537,6 +550,9 @@ class TaskData: | |||
| 537 | provmap[name] = provider[0] | 550 | provmap[name] = provider[0] |
| 538 | return provmap | 551 | return provmap |
| 539 | 552 | ||
| 553 | def get_mcdepends(self): | ||
| 554 | return self.mcdepends | ||
| 555 | |||
| 540 | def dump_data(self): | 556 | def dump_data(self): |
| 541 | """ | 557 | """ |
| 542 | Dump some debug information on the internal data structures | 558 | Dump some debug information on the internal data structures |
