summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):
1034 'changes') 1034 'changes')
1035 1035
1036 _remove_source_files(args, remove_files, destpath) 1036 _remove_source_files(args, remove_files, destpath)
1037 return True
1037 1038
1038def _update_recipe_patch(args, config, workspace, srctree, rd, config_data): 1039def _update_recipe_patch(args, config, workspace, srctree, rd, config_data):
1039 """Implement the 'patch' mode of update-recipe""" 1040 """Implement the 'patch' mode of update-recipe"""
@@ -1135,10 +1136,12 @@ def _update_recipe_patch(args, config, workspace, srctree, rd, config_data):
1135 elif not updatefiles: 1136 elif not updatefiles:
1136 # Neither patches nor recipe were updated 1137 # Neither patches nor recipe were updated
1137 logger.info('No patches or files need updating') 1138 logger.info('No patches or files need updating')
1139 return False
1138 finally: 1140 finally:
1139 shutil.rmtree(tempdir) 1141 shutil.rmtree(tempdir)
1140 1142
1141 _remove_source_files(args, remove_files, destpath) 1143 _remove_source_files(args, remove_files, destpath)
1144 return True
1142 1145
1143def _guess_recipe_update_mode(srctree, rdata): 1146def _guess_recipe_update_mode(srctree, rdata):
1144 """Guess the recipe update mode to use""" 1147 """Guess the recipe update mode to use"""
@@ -1187,15 +1190,16 @@ def update_recipe(args, config, basepath, workspace):
1187 mode = args.mode 1190 mode = args.mode
1188 1191
1189 if mode == 'srcrev': 1192 if mode == 'srcrev':
1190 _update_recipe_srcrev(args, srctree, rd, tinfoil.config_data) 1193 updated = _update_recipe_srcrev(args, srctree, rd, tinfoil.config_data)
1191 elif mode == 'patch': 1194 elif mode == 'patch':
1192 _update_recipe_patch(args, config, workspace, srctree, rd, tinfoil.config_data) 1195 updated = _update_recipe_patch(args, config, workspace, srctree, rd, tinfoil.config_data)
1193 else: 1196 else:
1194 raise DevtoolError('update_recipe: invalid mode %s' % mode) 1197 raise DevtoolError('update_recipe: invalid mode %s' % mode)
1195 1198
1196 rf = rd.getVar('FILE', True) 1199 if updated:
1197 if rf.startswith(config.workspace_path): 1200 rf = rd.getVar('FILE', True)
1198 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) 1201 if rf.startswith(config.workspace_path):
1202 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)
1199 1203
1200 return 0 1204 return 0
1201 1205