From de7c939a7f15f1800a56261303672fa0e5c740c7 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 8 Feb 2010 18:50:34 +0100 Subject: bitbake: runqueue.py: improve printing dependent tasks Print names instead of Task-IDs (and not mentioning they're task ids). Previously we printed e.g.: Dependency loop #1 found: Task 89 (/there/src/oe/openembedded/recipes/busybox/busybox-native_1.15.2.bb, do_configure) (depends: Set([88, 282, 92, 87])) Now we say Dependency loop #1 found: Task 89 (/there/src/oe/openembedded/recipes/busybox/busybox-native_1.15.2.bb, do_configure) (dependent Task-IDs ['busybox-native, do_patch', 'update-rc.d, do_populate_staging', 'busybox-native, do_populate_staging', 'shasum-native.bb, do_populate_staging', 'busybox-native, do_unpack']) (Bitbake rev: 00eaf76fdc32eb515995b47dfa69eb90ca904b37) Signed-off-by: Bernhard Reutner-Fischer Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 3a438894b8..f315b5d40a 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -175,9 +175,17 @@ class RunQueue: self.runq_task = [] self.runq_depends = [] self.runq_revdeps = [] - self.state = runQueuePrepare + def runq_depends_names(self, ids): + import re + ret = [] + for id in self.runq_depends[ids]: + nam = os.path.basename(self.get_user_idstring(id)) + nam = re.sub("_[^,]*,", ",", nam) + ret.extend([nam]) + return ret + def get_user_idstring(self, task): fn = self.taskData.fn_index[self.runq_fnid[task]] taskname = self.runq_task[task] @@ -248,7 +256,7 @@ class RunQueue: valid_chains.append(new_chain) msgs.append("Dependency loop #%d found:\n" % len(valid_chains)) for dep in new_chain: - msgs.append(" Task %s (%s) (depends: %s)\n" % (dep, self.get_user_idstring(dep), self.runq_depends[dep])) + msgs.append(" Task %s (%s) (dependent Tasks %s)\n" % (dep, self.get_user_idstring(dep), self.runq_depends_names(dep))) msgs.append("\n") if len(valid_chains) > 10: msgs.append("Aborted dependency loops search after 10 matches.\n") -- cgit v1.2.3