Skip to content

Commit

Permalink
DRAFT bitbake/run.py: Don't generate files/* if given --only (ros-inf…
Browse files Browse the repository at this point in the history
…rastructure#224)

XXX Also, use different commit summary.

XXX Don't attempt a commit if there are no changes.
  • Loading branch information
herb-kuta-lge committed Nov 13, 2019
1 parent ce4c048 commit ac8e26f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
7 changes: 5 additions & 2 deletions superflore/generators/bitbake/ros_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ def commit_changes(self, distro, commit_msg):
'files/{0}/newer-platform-components.list'.format(distro))
self.repo.git.add(
'files/{0}/superflore-change-summary.txt'.format(distro))
info('Committing to branch {0}...'.format(self.branch_name))
self.repo.git.commit(m=commit_msg)
if self.repo.git.status('--porcelain') == '':
info('Nothing changed; no commit done')
else:
info('Committing to branch {0}...'.format(self.branch_name))
self.repo.git.commit(m=commit_msg)

def pull_request(self, message, distro=None, title=''):
self.repo.pull_request(message, title, branch=distro)
Expand Down
17 changes: 3 additions & 14 deletions superflore/generators/bitbake/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,10 @@ def main():
except KeyError:
err("No package to satisfy key '%s'" % pkg)
sys.exit(1)
yoctoRecipe.generate_ros_distro_inc(
_repo, args.ros_distro, overlay.get_file_revision_logs(
'files/{0}/cache.yaml'.format(args.ros_distro)),
distro.release_platforms, skip_keys)
yoctoRecipe.generate_superflore_datetime_inc(
_repo, args.ros_distro, now)
yoctoRecipe.generate_distro_cache(_repo, args.ros_distro)
yoctoRecipe.generate_rosdep_resolve(_repo, args.ros_distro)
yoctoRecipe.generate_newer_platform_components(
_repo, args.ros_distro)
yoctoRecipe.generate_superflore_change_summary(
_repo, args.ros_distro, overlay.get_change_summary())
# Commit changes and file pull request
title = '{{{0}}} Sync to {0}-cache.yaml as of {1}\n'.format(
args.ros_distro, now)
title =\
'{{{0}}} Selected recipes generated from to '\
'{0}-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

0 comments on commit ac8e26f

Please sign in to comment.