aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-04-18 11:33:10 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:53 +1200
commit7ea14221b84f71f04292734c11c9f23ef636bf71 (patch)
tree7e381085d3e63d028ceaec3be476510d9355d81a
parent5db8759b4fb34fe5fba88f962a40ce0f92c8152a (diff)
downloadopenembedded-core-contrib-7ea14221b84f71f04292734c11c9f23ef636bf71.tar.gz
openembedded-core-contrib-7ea14221b84f71f04292734c11c9f23ef636bf71.tar.bz2
openembedded-core-contrib-7ea14221b84f71f04292734c11c9f23ef636bf71.zip
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 upgrade_history_internal.py which will ignore them (which is significantly slower). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rwxr-xr-xrrs/tools/rrs_upgrade_history.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/rrs/tools/rrs_upgrade_history.py b/rrs/tools/rrs_upgrade_history.py
index 8dac42a868..7b0568c20d 100755
--- a/rrs/tools/rrs_upgrade_history.py
+++ b/rrs/tools/rrs_upgrade_history.py
@@ -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, datetime.today().strftime("%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:
break
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