diff options
author | Rob Bradford <rob@linux.intel.com> | 2008-10-24 14:44:30 +0100 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2008-10-24 14:44:30 +0100 |
commit | fbfc669583328a6df2415ecc6343bba509e44459 (patch) | |
tree | 02d8d1bcd322871174449f6ce7ef7ee550fe86c2 /bitbake-dev | |
parent | 87fe772b8a208d3366be9ab3b605b2e8edda6b50 (diff) | |
download | poky-fbfc669583328a6df2415ecc6343bba509e44459.tar.gz |
bitbake-dev: add a setVariable command
This is synonymous with the getVariable command and allows you to set values
in the data dictionary.
Diffstat (limited to 'bitbake-dev')
-rw-r--r-- | bitbake-dev/lib/bb/command.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake-dev/lib/bb/command.py b/bitbake-dev/lib/bb/command.py index 293202be54..0d4ef42569 100644 --- a/bitbake-dev/lib/bb/command.py +++ b/bitbake-dev/lib/bb/command.py | |||
@@ -125,6 +125,15 @@ class CommandsSync: | |||
125 | 125 | ||
126 | return bb.data.getVar(varname, command.cooker.configuration.data, expand) | 126 | return bb.data.getVar(varname, command.cooker.configuration.data, expand) |
127 | 127 | ||
128 | def setVariable(self, command, params): | ||
129 | """ | ||
130 | Set the value of variable in configuration.data | ||
131 | """ | ||
132 | varname = params[0] | ||
133 | value = params[1] | ||
134 | bb.data.setVar(varname, value, command.cooker.configuration.data) | ||
135 | |||
136 | |||
128 | class CommandsAsync: | 137 | class CommandsAsync: |
129 | """ | 138 | """ |
130 | A class of asynchronous commands | 139 | A class of asynchronous commands |