[oe-commits] [openembedded-core] 01/02: devtool: update-recipe: handle where SRC_URI is appended to with +=

git at git.openembedded.org git at git.openembedded.org
Thu Apr 14 10:00:15 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 0b7d275e460e3e2310a4ca701eaee7a3fc8f43d4
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Thu Apr 14 20:24:18 2016 +1200

    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].
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oe/recipeutils.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 5e0fda5..6c7adb5 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=''):
                     outputvalue(k, newlines, rewindcomments=True)
                     del remainingnames[k]
             # Now change this variable, if it needs to be changed
-            if varname in existingnames:
-                outputvalue(varname, newlines)
-                del remainingnames[varname]
+            if varname in existingnames and op in ['+=', '=', '=+']:
+                if varname in remainingnames:
+                    outputvalue(varname, newlines)
+                    del remainingnames[varname]
                 return None, None, 0, True
         else:
             if varname in values:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list