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 comment and overlay.get_file_revision_logs() call
* Fixes #264

Signed-off-by: Martin Jansa <martin.jansa@lge.com>
  • Loading branch information
shr-project committed Mar 20, 2020
1 parent a008d82 commit 47d0a0c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
16 changes: 12 additions & 4 deletions superflore/generators/bitbake/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ 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)
'meta-ros{1}-{0}/files/{0}/generated/cache.yaml '\
'as of {2}\n'.format(
args.ros_distro,
yoctoRecipe._get_ros_version(args.ros_distro),
now)
regen_dict = dict()
regen_dict[args.ros_distro] = args.only
delta = "Regenerated: '%s'\n" % args.only
Expand Down Expand Up @@ -178,7 +182,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 @@ -209,8 +214,11 @@ 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 meta-ros{1}-{0}/files/{0}/generated/'\
'cache.yaml as of {2}\n'.format(
args.ros_distro,
yoctoRecipe._get_ros_version(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 47d0a0c

Please sign in to comment.