aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-03-29 00:45:23 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:53 +1200
commit518e280a4612e033b9144f7f4c6fd5b63b192a98 (patch)
tree8bd248209e4f9c875fedae2f0d647bf96b57c46d
parent70084bd48d09295141d2240cff4a3f5005d7edff (diff)
downloadopenembedded-core-contrib-518e280a4612e033b9144f7f4c6fd5b63b192a98.tar.gz
openembedded-core-contrib-518e280a4612e033b9144f7f4c6fd5b63b192a98.tar.bz2
openembedded-core-contrib-518e280a4612e033b9144f7f4c6fd5b63b192a98.zip
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 <paul.eggleton@linux.intel.com>
-rw-r--r--rrs/tools/upgrade_history_internal.py11
1 files changed, 11 insertions, 0 deletions
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