Skip to content

Commit

Permalink
bitbake: Fix path to cache.yaml in various places.
Browse files Browse the repository at this point in the history
* Fix path to cache.yaml in generated comment in
  superflore-ros-distro.inc, overlay.get_file_revision_logs() call, and
  commit summaries.
* Fixes ros-infrastructure#264

Signed-off-by: Martin Jansa <[email protected]>
  • Loading branch information
shr-project authored and herb-kuta-lge committed Mar 23, 2020
1 parent 7bf6569 commit 4f731a7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
14 changes: 10 additions & 4 deletions superflore/generators/bitbake/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,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
Expand Down Expand Up @@ -176,7 +179,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)
Expand Down Expand Up @@ -207,8 +211,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])
Expand Down
10 changes: 6 additions & 4 deletions superflore/generators/bitbake/yocto_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4f731a7

Please sign in to comment.