Skip to content

Commit

Permalink
bitbake: fix removing all generated files before re-creating them
Browse files Browse the repository at this point in the history
* without split() it was trying to remove all these files as one
  path in quotes and failing as shown after removing --ignore-unmatch

  git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
    cmdline: git rm -rf meta-ros2-eloquent/generated-recipes meta-ros2-eloquent/conf/ros-distro/include/eloquent/generated meta-ros2-eloquent/files/eloquent/generated/newer-platform-components.list meta-ros2-eloquent/files/eloquent/generated/rosdep-resolve.yaml meta-ros2-eloquent/files/eloquent/generated/superflore-change-summary.txt
    stderr: 'fatal: pathspec 'meta-ros2-eloquent/generated-recipes meta-ros2-eloquent/conf/ros-distro/include/eloquent/generated meta-ros2-eloquent/files/eloquent/generated/newer-platform-components.list meta-ros2-eloquent/files/eloquent/generated/rosdep-resolve.yaml meta-ros2-eloquent/files/eloquent/generated/superflore-change-summary.txt ' did not match any files'

  with split() it correctly complains only about superflore-change-summary.txt
  which will be fixed by returning --ignore-unmatch

  git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
    cmdline: git rm -rf meta-ros2-eloquent/generated-recipes meta-ros2-eloquent/conf/ros-distro/include/eloquent/generated meta-ros2-eloquent/files/eloquent/generated/newer-platform-components.list meta-ros2-eloquent/files/eloquent/generated/rosdep-resolve.yaml meta-ros2-eloquent/files/eloquent/generated/superflore-change-summary.txt
    stderr: 'fatal: pathspec 'meta-ros2-eloquent/files/eloquent/generated/superflore-change-summary.txt' did not match any files'

Signed-off-by: Martin Jansa <martin.jansa@lge.com>
  • Loading branch information
shr-project committed Dec 5, 2020
1 parent 7f2a716 commit f704598
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superflore/generators/bitbake/ros_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def clean_ros_recipe_dirs(self, distro):
info(
'Cleaning up:\n{0}'
.format(files))
self.repo.git.rm('-rf', '--ignore-unmatch', files)
self.repo.git.rm('-rf', '--ignore-unmatch', files.split())

def commit_changes(self, distro, commit_msg):
info('Commit changes...')
Expand Down

0 comments on commit f704598

Please sign in to comment.