summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-02-19 22:38:52 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-21 09:31:59 +0000
commit391b9ba30d802ac420ddf382588e03e718861c01 (patch)
tree8baa6706fd72ea18ce1834ab3c3b8c3dbd0aae83
parentbbe63eb97ae7f78959f117d6066ef821c4da1c77 (diff)
downloadopenembedded-core-contrib-391b9ba30d802ac420ddf382588e03e718861c01.tar.gz
openembedded-core-contrib-391b9ba30d802ac420ddf382588e03e718861c01.tar.bz2
openembedded-core-contrib-391b9ba30d802ac420ddf382588e03e718861c01.zip
devtool: update-recipe: don't show workspace recipe warning if no update
If we didn't make any changes to the file then there's no point warning the user that we have done. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/devtool/standard.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index bbbe426493..804c127848 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1034,6 +1034,7 @@ def _update_recipe_srcrev(args, srctree, rd, config_data):
'changes')
_remove_source_files(args, remove_files, destpath)
+ return True
def _update_recipe_patch(args, config, workspace, srctree, rd, config_data):
"""Implement the 'patch' mode of update-recipe"""
@@ -1135,10 +1136,12 @@ def _update_recipe_patch(args, config, workspace, srctree, rd, config_data):
elif not updatefiles:
# Neither patches nor recipe were updated
logger.info('No patches or files need updating')
+ return False
finally:
shutil.rmtree(tempdir)
_remove_source_files(args, remove_files, destpath)
+ return True
def _guess_recipe_update_mode(srctree, rdata):
"""Guess the recipe update mode to use"""
@@ -1187,15 +1190,16 @@ def update_recipe(args, config, basepath, workspace):
mode = args.mode
if mode == 'srcrev':
- _update_recipe_srcrev(args, srctree, rd, tinfoil.config_data)
+ updated = _update_recipe_srcrev(args, srctree, rd, tinfoil.config_data)
elif mode == 'patch':
- _update_recipe_patch(args, config, workspace, srctree, rd, tinfoil.config_data)
+ updated = _update_recipe_patch(args, config, workspace, srctree, rd, tinfoil.config_data)
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)
+ if updated:
+ 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