From a62ab520c55f3b6173266b8fc3822d5bcd2fc35a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Tue, 7 Jul 2015 08:55:32 -0500 Subject: [PATCH] rrs/tools/rrs_upgrade_history.py: Only run upgrade detection when detect recipe files in commit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aníbal Limón --- rrs/tools/rrs_upgrade_history.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/rrs/tools/rrs_upgrade_history.py b/rrs/tools/rrs_upgrade_history.py index 5808a8e..c2e76a7 100755 --- a/rrs/tools/rrs_upgrade_history.py +++ b/rrs/tools/rrs_upgrade_history.py @@ -188,7 +188,6 @@ def upgrade_history(options, logger): ct = commit_list.pop(0) utils.runcmd("git checkout %s -b %s -f" % (ct, branch_name_tmp), repodir, logger=logger) - (tinfoil, d, recipes) = load_recipes(layerbranch, bitbakepath, fetchdir, settings, logger, nocheckout=True) @@ -209,15 +208,20 @@ def upgrade_history(options, logger): utils.runcmd("git checkout %s -b %s -f" % (ct, branch_name_tmp), repodir, logger=logger) + fns = _get_recipes_filenames(ct, repodir, layerdir, logger) + if not fns: + utils.runcmd("git checkout master -f", repodir, logger=logger) + utils.runcmd("git branch -D %s" % (branch_name_tmp), repodir, logger=logger) + continue + + (tinfoil, d, recipes) = load_recipes(layerbranch, bitbakepath, + fetchdir, settings, logger, recipe_files=fns, + nocheckout=True) + title = utils.runcmd("git log --format='%s' -n 1 " + ct, repodir, logger=logger) info = utils.runcmd("git log --format='%an;%ae;%ad;%cd' --date=rfc -n 1 " \ + ct, destdir=repodir, logger=logger) - - fns = _get_recipes_filenames(ct, repodir, layerdir, logger) - (tinfoil, d, recipes) = load_recipes(layerbranch, bitbakepath, - fetchdir, settings, logger, recipe_files=fns, - nocheckout=True) for recipe_data in recipes: _create_upgrade(recipe_data, layerbranch, ct, title, info, logger)