From 518e280a4612e033b9144f7f4c6fd5b63b192a98 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Thu, 29 Mar 2018 00:45:23 +1300 Subject: rrs_upgrade_history: handle only .inc file changing If a recipe upgrade only consists of a .inc file changing, we were not picking it up, since we were only looking specifically for recipes (.bb). If a .inc file changes, assume all .bb files in the same directory (if any) should be parsed to look for an upgrade. Signed-off-by: Paul Eggleton --- rrs/tools/upgrade_history_internal.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rrs/tools/upgrade_history_internal.py b/rrs/tools/upgrade_history_internal.py index e8c3c91533..15d4671b1f 100644 --- a/rrs/tools/upgrade_history_internal.py +++ b/rrs/tools/upgrade_history_internal.py @@ -119,12 +119,14 @@ def _create_upgrade(recipe_data, layerbranch, ct, title, info, logger, initial=F Returns a list containing the fullpaths to the recipes from a commit. """ def _get_recipes_filenames(ct, repodir, layerdir, logger): + import glob ct_files = [] layerdir_start = os.path.normpath(layerdir) + os.sep files = utils.runcmd("git log --name-only --format='%n' -n 1 " + ct, repodir, logger=logger) + incdirs = [] for f in files.split("\n"): if f != "": fullpath = os.path.join(repodir, f) @@ -138,6 +140,15 @@ def _get_recipes_filenames(ct, repodir, layerdir, logger): layerdir_start) if typename == 'recipe': ct_files.append(fullpath) + elif fullpath.endswith('.inc'): + fpath = os.path.dirname(fullpath) + if not fpath in incdirs: + incdirs.append(fpath) + for fpath in incdirs: + # Let's just assume that all .bb files next to a .inc need to be checked + for f in glob.glob(os.path.join(fpath, '*.bb')): + if not f in ct_files: + ct_files.append(f) return ct_files -- cgit 1.2.3-korg