Patchwork [bitbake-devel] codeparser: Fix var_execs to append to execs, not references

mail settings
Submitter Richard Purdie
Date Feb. 28, 2014, 5:38 p.m.
Message ID <1393609095.31769.204.camel@ted>
Download mbox | patch
Permalink /patch/67753/
State New
Headers show


Richard Purdie - Feb. 28, 2014, 5:38 p.m.
When using the "execs" information in new code, it became clear that
the returned data was incorrect and there were missing exec'd functions.
This corrects the error and changes one of the test results to match
the correct behaviour.

Signed-off-by: Richard Purdie <>


diff --git a/bitbake/lib/bb/ b/bitbake/lib/bb/
index 62b6cf9..a50b9f2 100644
--- a/bitbake/lib/bb/
+++ b/bitbake/lib/bb/
@@ -186,7 +186,7 @@  class PythonParser():
             if n.__class__.__name__ == "Call":
-        self.references.update(self.var_execs)
+        self.execs.update(self.var_execs)
         codeparsercache.pythoncacheextras[h] = {}
         codeparsercache.pythoncacheextras[h]["refs"] = self.references
diff --git a/bitbake/lib/bb/tests/ b/bitbake/lib/bb/tests/
index 938b04b..4454bc5 100644
--- a/bitbake/lib/bb/tests/
+++ b/bitbake/lib/bb/tests/
@@ -236,7 +236,8 @@  be. These unit tests are testing snippets."""
             self.d.setVar("do_something", "echo 'hi mom! ${FOO}'")
             self.d.setVarFlag("do_something", etype, True)
             self.parseExpression("'do_something', d)")
-            self.assertReferences(set(["do_something"]))
+            self.assertReferences(set([]))
+            self.assertExecs(set(["do_something"]))
     def test_function_reference(self):
         self.context["testfunc"] = lambda msg: bb.msg.note(1, None, msg)