From f774a31eb4a8d9c82a8ad257ce59645dafdf61ac Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 3 Sep 2019 10:58:30 +1200 Subject: [PATCH] RRS: avoid historical parsing bug in bitbake In bitbake commit 5796ed550d127853808f38257f8dcc8c1cf59342, line numbering functionality was improved with the starting line number for python functions being stored in a "lineno" varflag; however, mapped functions (using EXPORT_FUNCTIONS) did not have a line number set, which caused parse failures. This bug was not fixed until 547128731e62b36d2271c4390b3fee2b16c535dc so we should be avoiding any bitbake commit inside that range. Signed-off-by: Paul Eggleton --- rrs/tools/rrs_upgrade_history.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/rrs/tools/rrs_upgrade_history.py b/rrs/tools/rrs_upgrade_history.py index c65a220..5070cc2 100755 --- a/rrs/tools/rrs_upgrade_history.py +++ b/rrs/tools/rrs_upgrade_history.py @@ -167,13 +167,19 @@ def upgrade_history(options, logger): commit_list = commits.split('\n') bitbake_map = {} + def remap_range(start, end, replacewith=None): + if replacewith is None: + replacewith = end + bitbake_commits = utils.runcmd(['git', 'rev-list', '%s^..%s^' % (start, end)], + bitbakepath, + logger=logger) + bitbake_commit_list = bitbake_commits.splitlines() + for commit in bitbake_commit_list: + bitbake_map[commit] = replacewith + # Filter out some bad commits - bitbake_commits = utils.runcmd(['git', 'rev-list', 'fef18b445c0cb6b266cd939b9c78d7cbce38663f^..39780b1ccbd76579db0fc6fb9369c848a3bafa9d^'], - bitbakepath, - logger=logger) - bitbake_commit_list = bitbake_commits.splitlines() - for commit in bitbake_commit_list: - bitbake_map[commit] = '39780b1ccbd76579db0fc6fb9369c848a3bafa9d' + remap_range('fef18b445c0cb6b266cd939b9c78d7cbce38663f', '39780b1ccbd76579db0fc6fb9369c848a3bafa9d') + remap_range('5796ed550d127853808f38257f8dcc8c1cf59342', '547128731e62b36d2271c4390b3fee2b16c535dc') if options.stop_commit and (options.stop_commit not in [x.split()[0] for x in commit_list]): logger.error('Stop commit %s is not in repository %s' % (options.stop_commit, repodir))