diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-11-19 17:17:25 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-01 21:32:05 +0000 |
commit | b381f804a541bb1d08e331c139a82e250f924c05 (patch) | |
tree | 5230624a355a67304840f9aa04acfad613a98d83 /scripts/recipetool | |
parent | 1fbd76093dadd990dcb6ef8bd35659c73950cf7e (diff) | |
download | poky-b381f804a541bb1d08e331c139a82e250f924c05.tar.gz |
recipetool: add setvar subcommand
Add a recipetool subcommand "setvar" to set a variable in a file. This
uses our existing logic such that it doesn't matter if the variable is
already set in the recipe, if it's set in the recipe or some inc file,
and if the variable is not currently set that the line setting the
variable gets inserted in the right place in the file.
Implements [YOCTO #7676].
(From OE-Core rev: 7c33ef77fa165182d24f0a9ae769e9e630e6bd47)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/recipetool')
-rwxr-xr-x | scripts/recipetool | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/recipetool b/scripts/recipetool index 87fb35ed72..4af0bfb686 100755 --- a/scripts/recipetool +++ b/scripts/recipetool | |||
@@ -34,7 +34,7 @@ plugins = [] | |||
34 | def tinfoil_init(parserecipes): | 34 | def tinfoil_init(parserecipes): |
35 | import bb.tinfoil | 35 | import bb.tinfoil |
36 | import logging | 36 | import logging |
37 | tinfoil = bb.tinfoil.Tinfoil() | 37 | tinfoil = bb.tinfoil.Tinfoil(tracking=True) |
38 | tinfoil.prepare(not parserecipes) | 38 | tinfoil.prepare(not parserecipes) |
39 | tinfoil.logger.setLevel(logger.getEffectiveLevel()) | 39 | tinfoil.logger.setLevel(logger.getEffectiveLevel()) |
40 | return tinfoil | 40 | return tinfoil |
@@ -96,7 +96,9 @@ def main(): | |||
96 | 96 | ||
97 | try: | 97 | try: |
98 | if getattr(args, 'parserecipes', False): | 98 | if getattr(args, 'parserecipes', False): |
99 | tinfoil.config_data.disableTracking() | ||
99 | tinfoil.parseRecipes() | 100 | tinfoil.parseRecipes() |
101 | tinfoil.config_data.enableTracking() | ||
100 | ret = args.func(args) | 102 | ret = args.func(args) |
101 | except bb.BBHandledException: | 103 | except bb.BBHandledException: |
102 | ret = 1 | 104 | ret = 1 |