mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
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>
This commit is contained in:
parent
5db8759b4f
commit
7ea14221b8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user