[oe-commits] Paul Eggleton : devtool: update-recipe: add a warning when recipe is inside the workspace

git at git.openembedded.org git at git.openembedded.org
Tue Sep 8 22:56:26 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: f82c3b26807da929251a836953c0a9072d94278d
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f82c3b26807da929251a836953c0a9072d94278d

Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date:   Tue Sep  8 11:39:13 2015 +0100

devtool: update-recipe: add a warning when recipe is inside the workspace

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 at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 scripts/lib/devtool/standard.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index f76c632..4702491 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -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
 
 



More information about the Openembedded-commits mailing list