diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-04-14 20:24:18 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-15 06:59:43 +0100 |
commit | 8353557193a5e3d2bfa7861f11acfb2c0cb4f7fe (patch) | |
tree | 498eb2c59b462591fed085908d07a6a9d4d043f6 /meta | |
parent | aab3c8d56dd6344b1e6cf38e610970bc68b2f624 (diff) | |
download | poky-8353557193a5e3d2bfa7861f11acfb2c0cb4f7fe.tar.gz |
devtool: update-recipe: handle where SRC_URI is appended to with +=
If a recipe sets SRC_URI and then appends more items to it with +=
(such as the current rpm recipe in OE-Core), the code in
patch_recipe_file() was failing with a traceback. Work around the
problem for now by dropping the existing lines if we understand the
operation, else just set the value outright at the end. This leaves
something to be desired as it either doesn't respect the existing
structure or leaves a mess but it's better than the current
breakage.
We'll need to come up with a better solution later. Part of the problem
is the existing code structure doesn't allow for patch_recipe_file() to
know what's being added or removed - it only knows the final value that
the caller wants set.
Fixes [YOCTO #9458].
(From OE-Core rev: da5cd84794e1ab5c4efcd6250d3b93a46f610744)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 5e0fda5235..6c7adb5bdb 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -235,9 +235,10 @@ def patch_recipe_file(fn, values, patch=False, relpath=''): | |||
235 | outputvalue(k, newlines, rewindcomments=True) | 235 | outputvalue(k, newlines, rewindcomments=True) |
236 | del remainingnames[k] | 236 | del remainingnames[k] |
237 | # Now change this variable, if it needs to be changed | 237 | # Now change this variable, if it needs to be changed |
238 | if varname in existingnames: | 238 | if varname in existingnames and op in ['+=', '=', '=+']: |
239 | outputvalue(varname, newlines) | 239 | if varname in remainingnames: |
240 | del remainingnames[varname] | 240 | outputvalue(varname, newlines) |
241 | del remainingnames[varname] | ||
241 | return None, None, 0, True | 242 | return None, None, 0, True |
242 | else: | 243 | else: |
243 | if varname in values: | 244 | if varname in values: |