diff options
authorPaul Eggleton <>2018-04-18 11:33:10 +1200
committerPaul Eggleton <>2018-05-04 23:57:53 +1200
commit7ea14221b84f71f04292734c11c9f23ef636bf71 (patch)
parent5db8759b4fb34fe5fba88f962a40ce0f92c8152a (diff)
rrs_upgrade_history: skip commits that don't touch the layer
If we're in a repository containing multiple layers, we don't care about commits that don't affect the layer we are processing, so skip those commits rather than passing them to which will ignore them (which is significantly slower). Signed-off-by: Paul Eggleton <>
1 files changed, 10 insertions, 1 deletions
diff --git a/rrs/tools/ b/rrs/tools/
index 8dac42a868..7b0568c20d 100755
--- a/rrs/tools/
+++ b/rrs/tools/
@@ -153,6 +153,12 @@ def upgrade_history(options, logger):
ctdate = datetime.fromtimestamp(int(ctepoch))
run_internal(maintplanbranch, ct, ctdate, options, logger, bitbake_map, initial=True)
+ if layerbranch.vcs_subdir:
+ layersubdir_start = layerbranch.vcs_subdir
+ if not layersubdir_start.endswith('/'):
+ layersubdir_start += '/'
+ else:
+ layersubdir_start = ''
logger.debug("Adding upgrade history from %s to %s ..." % (since,"%Y-%m-%d")))
for item in commit_list:
if item:
@@ -163,6 +169,9 @@ def upgrade_history(options, logger):
for parent in commitobj.parents:
diff = parent.diff(commitobj)
for diffitem in diff:
+ if layersubdir_start and not (diffitem.a_path.startswith(layersubdir_start) or diffitem.b_path.startswith(layersubdir_start)):
+ # Not in this layer, skip it
+ continue
if diffitem.a_path.endswith(('.bb', '.inc')) or diffitem.b_path.endswith(('.bb', '.inc')):
# We need to look at this commit
touches_recipe = True
@@ -170,7 +179,7 @@ def upgrade_history(options, logger):
if touches_recipe:
if not touches_recipe:
- # No recipes changed in this commit
+ # No recipes in the layer changed in this commit
# NOTE: Whilst it's possible that a change to a class might alter what's
# in the recipe, we can ignore that since we are only concerned with actual
# upgrades which would always require some sort of change to the recipe