]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: update-recipe: add a warning when recipe is inside the workspace
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 8 Sep 2015 10:39:13 +0000 (11:39 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Sep 2015 13:25:06 +0000 (14:25 +0100)
If a recipe has been added to the workspace via "devtool add"
or "devtool upgrade" then the recipe file itself will be in the
workspace layer; if you run "devtool update-recipe" particularly in the
upgrade case you might think it would apply the upgrade to the original
recipe, but it will not - in order to remain consistent it has to update
the recipe that's in use which is the one in the workspace. Warn the
user in this situation so that they know what they need to do when they
are finished.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/standard.py

index f76c632e78b80495641b6af1de646f8801833d01..4702491fe02756c2faf573e5fbc961a3e45e9c09 100644 (file)
@@ -815,6 +815,10 @@ def update_recipe(args, config, basepath, workspace):
     else:
         raise DevtoolError('update_recipe: invalid mode %s' % mode)
 
+    rf = rd.getVar('FILE', True)
+    if rf.startswith(config.workspace_path):
+        logger.warn('Recipe file %s has been updated but is inside the workspace - you will need to move it (and any associated files next to it) out to the desired layer before using "devtool reset" in order to keep any changes' % rf)
+
     return 0