Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix genapkbuild.py to set build_type to cmake for ROS1 packages whose buildtool_depend is not catkin #168

Merged
merged 3 commits into from
May 29, 2024

Conversation

Taka-Kazu
Copy link
Contributor

@Taka-Kazu Taka-Kazu commented May 29, 2024

build_type is not specified in package.xml of catkin package. In this case, get_build_type() returns "catkin". This has changed APKBUILD of catkin package to build it by catkin.

By this PR, build_type is overwritten if the package is not ROS 2 and not buildtool_depend==catkin.
(originally reported by @at-wat)

@Taka-Kazu Taka-Kazu requested a review from at-wat May 29, 2024 03:52
@@ -266,6 +266,8 @@ def package_to_apkbuild(ros_distro, package_name,
ament_python = False

build_type = pkg.get_build_type()
if not is_ros2 and not pkg.has_buildtool_depend_on_catkin():
build_type = 'cmake'
if build_type == 'catkin':
catkin = True
elif build_type == 'cmake':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this condition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not that necessary but if there will be automatic updates for ROS 1 packages registered in aports-ros-experimental, this change might be useful as we don't need to fix them by hand.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought L271 is elif.
Maybe better to add a newline after L270.

If ROS2 package may specify <build_type>cmake</build_type>, this should be required for ROS2 package with build_type=cmake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand what you mean now. I agree to change L271 to elif. Done in fa0f9b9.

Copy link
Member

@at-wat at-wat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Taka-Kazu Taka-Kazu merged commit 1f39ab2 into master May 29, 2024
3 checks passed
@Taka-Kazu Taka-Kazu deleted the fix-build-type-for-ros1 branch May 29, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants