Explorar o código

methodpool: Improve method already seen error message

The current error message is confusing, this improves it to explain the problem
and the possible ways to resolve it.

[YOCTO #2530]

(Bitbake rev: d316f28ed725ff40daa8771c1aa224ac46d5b224)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie %!s(int64=13) %!d(string=hai) anos
pai
achega
4ff6160d90
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      bitbake/lib/bb/methodpool.py

+ 1 - 1
bitbake/lib/bb/methodpool.py

@@ -52,7 +52,7 @@ def insert_method(modulename, code, fn):
         if name in ['None', 'False']:
             continue
         elif name in _parsed_fns and not _parsed_fns[name] == modulename:
-            error( "Error Method already seen: %s in' %s' now in '%s'" % (name, _parsed_fns[name], modulename))
+            error("The function %s defined in %s was already declared in %s. BitBake has a global python function namespace so shared functions should be declared in a common include file rather than being duplicated, or if the functions are different, please use different function names." % (name, modulename, _parsed_fns[name]))
         else:
             _parsed_fns[name] = modulename