diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-11-28 17:16:15 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-03 12:20:00 +0000 |
commit | f1ca6f73ebadb73fd362f7084c9c0093215fa379 (patch) | |
tree | 8a8ef1aa28ec68c24158e420f4eb0d9263b76687 /meta/lib/oe/recipeutils.py | |
parent | 15fb7acb7761cd0026cb4547fa8ad216123f4a10 (diff) | |
download | poky-f1ca6f73ebadb73fd362f7084c9c0093215fa379.tar.gz |
lib/oe/recipeutils: patch_recipe(): fix replacing varflag values
The code here wasn't correctly getting the variable history for
varflags, so for example if you did a devtool upgrade on a recipe where
the SRC_URI checksums were in the .inc file (typical for python recipes
in order to support both python 2 and 3) then after the upgrade the
new values would be set in the recipe and the old values were left in
the .inc, which is not right. Teach the code here how to get the history
for varflags so it works properly.
(From OE-Core rev: f077ab3ad67b2f3eb4aa8882fe2e7aef2d09a26c)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 9de291f5b5..886ad26f17 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -81,11 +81,19 @@ def get_var_files(fn, varlist, d): | |||
81 | """ | 81 | """ |
82 | varfiles = {} | 82 | varfiles = {} |
83 | for v in varlist: | 83 | for v in varlist: |
84 | history = d.varhistory.variable(v) | ||
85 | files = [] | 84 | files = [] |
86 | for event in history: | 85 | if '[' in v: |
87 | if 'file' in event and not 'flag' in event: | 86 | varsplit = v.split('[') |
88 | files.append(event['file']) | 87 | varflag = varsplit[1].split(']')[0] |
88 | history = d.varhistory.variable(varsplit[0]) | ||
89 | for event in history: | ||
90 | if 'file' in event and event.get('flag', '') == varflag: | ||
91 | files.append(event['file']) | ||
92 | else: | ||
93 | history = d.varhistory.variable(v) | ||
94 | for event in history: | ||
95 | if 'file' in event and not 'flag' in event: | ||
96 | files.append(event['file']) | ||
89 | if files: | 97 | if files: |
90 | actualfile = files[-1] | 98 | actualfile = files[-1] |
91 | else: | 99 | else: |