All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] taskdata.py: include more information in error message about broken task depends
@ 2017-03-17  9:20 Patrick Ohly
  0 siblings, 0 replies; only message in thread
From: Patrick Ohly @ 2017-03-17  9:20 UTC (permalink / raw)
  To: bitbake-devel

This is what was reported when variable expansion in the 'depends'
varflag of a task was broken:

   ERROR: Error for .../refkit-image-common.bb, dependency ${@ does not contain exactly one ':' character.
    Task 'depends' should be specified in the form 'packagename:task'

It's not clear which task had this broken 'depends' and while one can
guess that variable expansion failed, the full expression isn't
printed either.

This is more useful:

   ERROR: Error for .../refkit-image-common.bb:do_stage_swupd_inputs[depends], dependency ${@ in '      virtual/fakeroot-native:do_populate_sysroot     ${@ ' '.join(['bundle-refkit-image-common-%s:do_swupd_list_bundle' % x for x in '${SWUPD_BUNDLES}'.split()]) } ' does not contain exactly one ':' character.
    Task 'depends' should be specified in the form 'packagename:task'

The 'depends' part gets repeated intentionally, to ensure that it doesn't get overlooked.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 lib/bb/taskdata.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/taskdata.py b/lib/bb/taskdata.py
index 1f3b24c8..8c96a562 100644
--- a/lib/bb/taskdata.py
+++ b/lib/bb/taskdata.py
@@ -97,7 +97,7 @@ class TaskData:
                     if dep:
                         parts = dep.split(":")
                         if len(parts) != 2:
-                            bb.msg.fatal("TaskData", "Error for %s, dependency %s does not contain exactly one ':' character.\n Task '%s' should be specified in the form 'packagename:task'" % (fn, dep, dep_name))
+                            bb.msg.fatal("TaskData", "Error for %s:%s[%s], dependency %s in '%s' does not contain exactly one ':' character.\n Task '%s' should be specified in the form 'packagename:task'" % (fn, task, dep_name, dep, task_deps[dep_name][task], dep_name))
                         ids.append((parts[0], parts[1]))
                         seen(parts[0])
                 depends.extend(ids)
-- 
2.11.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-17  9:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17  9:20 [PATCH] taskdata.py: include more information in error message about broken task depends Patrick Ohly

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.