]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake-dev: add a setVariable command
authorRob Bradford <rob@linux.intel.com>
Fri, 24 Oct 2008 13:44:30 +0000 (14:44 +0100)
committerRob Bradford <rob@linux.intel.com>
Fri, 24 Oct 2008 13:44:30 +0000 (14:44 +0100)
This is synonymous with the getVariable command and allows you to set values
in the data dictionary.

bitbake-dev/lib/bb/command.py

index 293202be546b118b6aa5bd0769028493c1a7ea98..0d4ef42569f63c24310bf780d94416e7617aa7a9 100644 (file)
@@ -125,6 +125,15 @@ class CommandsSync:
 
         return bb.data.getVar(varname, command.cooker.configuration.data, expand)
 
+    def setVariable(self, command, params):
+        """
+        Set the value of variable in configuration.data
+        """
+        varname = params[0]
+        value = params[1]
+        bb.data.setVar(varname, value, command.cooker.configuration.data)
+
+
 class CommandsAsync:
     """
     A class of asynchronous commands