From dc4343cc985184306622a843f2f38477a2d1d175 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 3 Feb 2020 07:59:21 -0800 Subject: [PATCH] bitbake: Fix path to cache.yaml in various places. * Fix path to cache.yaml in comment and overlay.get_file_revision_logs() call * Fixes #264 Signed-off-by: Martin Jansa --- superflore/generators/bitbake/run.py | 14 ++++++++++---- superflore/generators/bitbake/yocto_recipe.py | 10 ++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/superflore/generators/bitbake/run.py b/superflore/generators/bitbake/run.py index abd95bf3..7d814d4e 100644 --- a/superflore/generators/bitbake/run.py +++ b/superflore/generators/bitbake/run.py @@ -144,7 +144,10 @@ def main(): # Commit changes and file pull request title =\ '{{{0}}} Selected recipes generated from '\ - '{0}-cache.yaml as of {1}\n'.format(args.ros_distro, now) + 'files/{0}/generated/cache.yaml '\ + 'as of {1}\n'.format( + args.ros_distro, + now) regen_dict = dict() regen_dict[args.ros_distro] = args.only delta = "Regenerated: '%s'\n" % args.only @@ -178,7 +181,8 @@ def main(): total_installers[adistro] = distro_installers yoctoRecipe.generate_ros_distro_inc( _repo, args.ros_distro, overlay.get_file_revision_logs( - 'meta-ros{0}-{1}/files/cache.yaml'.format( + 'meta-ros{0}-{1}/files/{1}/generated/cache.yaml' + .format( yoctoRecipe._get_ros_version(args.ros_distro), args.ros_distro)), distro.release_platforms, skip_keys) @@ -209,8 +213,10 @@ def main(): # remove duplicates delta = gen_delta_msg(total_changes, markup='') # Commit changes and file pull request - title = '{{{0}}} Sync to {0}-cache.yaml as of {1}\n'.format( - args.ros_distro, now) + title = '{{{0}}} Sync to files/{0}/generated/'\ + 'cache.yaml as of {1}\n'.format( + args.ros_distro, + now) commit_msg = '\n'.join([get_pr_text( title + '\n' + pr_comment.replace('**superflore**', 'superflore'), markup=''), delta]) diff --git a/superflore/generators/bitbake/yocto_recipe.py b/superflore/generators/bitbake/yocto_recipe.py index 8dd0348e..1c78c84b 100644 --- a/superflore/generators/bitbake/yocto_recipe.py +++ b/superflore/generators/bitbake/yocto_recipe.py @@ -581,10 +581,12 @@ def generate_ros_distro_inc( 'ROS_SUPERFLORE_GENERATION_NOT_POSSIBLE', yoctoRecipe.not_generated_recipes) + '\n') conf_file.write( - '# Number of commits that will be returned by' - + ' "git log files/ROS_DISTRO-cache.yaml" when the ' - + 'generated files are committed. This is\n# used for the' - + ' fourth version field of DISTRO_VERSION.\n') + '# Number of commits that will be returned by ' + '"git log meta-ros{0}-{1}/files/{1}/generated/' + 'cache.yaml" when the\n# generated files are committed. ' + 'This is used for the fourth version field of ' + 'DISTRO_VERSION.\n' + .format(yoctoRecipe._get_ros_version(distro), distro)) version = 1 if not version else len(version.splitlines()) + 1 conf_file.write( 'ROS_NUM_CACHE_YAML_COMMITS = "{}"'.format(version)