Skip to content

Add support for conditions #7

@robwoolley

Description

@robwoolley

Packages like osqp_vendor contain multiple build_type elements. These use conditionals to apply to both ROS 1 and ROS 2: https://github.com/tier4/osqp_vendor/blob/main/package.xml

This causes an exception in catkin_pkg.package:

ERROR:colcon:mash None: Only one <build_type> element is permitted.
Traceback (most recent call last):
File "/home/spaceros-user/mash/myenv/lib/python3.12/site-packages/colcon_core/command.py", line 593, in verb_main
rc = context.args.main(context=context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/spaceros-user/mash/myenv/lib/python3.12/site-packages/mash/verb/bitbake.py", line 121, in main
pkg_metadata = PackageMetadata(package_manifest, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/spaceros-user/mash/myenv/lib/python3.12/site-packages/mash/PackageMetadata.py", line 75, in init
self.build_type = pkg.get_build_type()
^^^^^^^^^^^^^^^^^^^^
File "/home/spaceros-user/mash/myenv/lib/python3.12/site-packages/catkin_pkg/package.py", line 167, in get_build_type
raise InvalidPackage('Only one <build_type> element is permitted.', self.filename)
catkin_pkg.package.InvalidPackage: Only one <build_type> element is permitted.

Octomap and behaviortree_cpp also use conditions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions