Пример #1
0
def get_subs(pkg, os_name, os_version, ros_distro):
    return generate_substitutions_from_package(
        pkg,
        os_name,
        os_version,
        ros_distro
    )
Пример #2
0
    def get_subs(self,
                 package,
                 debian_distro,
                 releaser_history,
                 native=False,
                 skip_package_names=None):
        def fallback_resolver(key, peer_packages, rosdistro=self.rosdistro):
            if key in peer_packages:
                return [
                    sanitize_package_name(rosify_package_name(key, rosdistro))
                ]
            return default_fallback_resolver(key, peer_packages)

        subs = generate_substitutions_from_package(
            package,
            self.os_name,
            debian_distro,
            self.rosdistro,
            self.install_prefix,
            self.debian_inc, [p.name for p in self.packages.values()],
            releaser_history=releaser_history,
            fallback_resolver=fallback_resolver,
            skip_package_names=skip_package_names)
        subs['Package'] = rosify_package_name(subs['Package'], self.rosdistro)

        # XXX Add workspace package to runtime and buildtime dependencies for ROS 2 only.
        if self.rosdistro in ['r2b2', 'r2b3', 'ardent', 'bouncy'] and \
                package.name not in ['ament_cmake_core', 'ament_package', 'ros_workspace']:
            workspace_pkg_name = rosify_package_name('ros-workspace',
                                                     self.rosdistro)
            subs['BuildDepends'].append(workspace_pkg_name)
            subs['Depends'].append(workspace_pkg_name)
        return subs
Пример #3
0
def get_subs(pkg, os_name, os_version, ros_distro):
    return generate_substitutions_from_package(
        pkg,
        os_name,
        os_version,
        ros_distro
    )
Пример #4
0
def get_subs(pkg, os_name, os_version, ros_distro):
    # No fallback_resolver provided because peer packages not considered.
    subs = generate_substitutions_from_package(
        pkg, os_name, os_version, ros_distro,
        RosDebianGenerator.default_install_prefix + ros_distro)
    subs['Package'] = rosify_package_name(subs['Package'], ros_distro)
    return subs
Пример #5
0
def get_subs(pkg, os_name, os_version, ros_distro, deb_inc=0, native=False):
    return generate_substitutions_from_package(pkg,
                                               os_name,
                                               os_version,
                                               ros_distro,
                                               deb_inc=deb_inc,
                                               native=native)
Пример #6
0
def get_subs(pkg, os_name, os_version, ros_distro, native=False):
    return generate_substitutions_from_package(
        pkg,
        os_name,
        os_version,
        ros_distro,
        native=native
    )
Пример #7
0
    def get_subs(self, package, debian_distro, releaser_history, native=False):
        def fallback_resolver(key, peer_packages, rosdistro=self.rosdistro):
            if key in peer_packages:
                return [
                    sanitize_package_name(rosify_package_name(key, rosdistro))
                ]
            return default_fallback_resolver(key, peer_packages)

        subs = generate_substitutions_from_package(
            package,
            self.os_name,
            debian_distro,
            self.rosdistro,
            self.install_prefix,
            self.debian_inc, [p.name for p in self.packages.values()],
            releaser_history=releaser_history,
            fallback_resolver=fallback_resolver)
        subs['Package'] = rosify_package_name(subs['Package'], self.rosdistro)

        # ROS 2 specific bloom extensions.
        ros2_distros = [
            name for name, values in get_index().distributions.items()
            if values.get('distribution_type') == 'ros2'
        ]
        if self.rosdistro in ros2_distros:
            # Add ros-workspace package as a dependency to any package other
            # than ros_workspace and its dependencies.
            if package.name not in [
                    'ament_cmake_core', 'ament_package', 'ros_workspace'
            ]:
                workspace_pkg_name = rosify_package_name(
                    'ros-workspace', self.rosdistro)
                subs['BuildDepends'].append(workspace_pkg_name)
                subs['Depends'].append(workspace_pkg_name)

            # Add packages necessary to build vendor typesupport for rosidl_interface_packages to their
            # build dependencies.
            if self.rosdistro in ros2_distros and \
                    self.rosdistro not in ('r2b2', 'r2b3', 'ardent') and \
                    'rosidl_interface_packages' in [p.name for p in package.member_of_groups]:
                ROS2_VENDOR_TYPESUPPORT_DEPENDENCIES = [
                    'rmw-connext-cpp',
                    'rmw-fastrtps-cpp',
                    'rmw-implementation',
                    'rmw-opensplice-cpp',
                    'rosidl-typesupport-connext-c',
                    'rosidl-typesupport-connext-cpp',
                    'rosidl-typesupport-opensplice-c',
                    'rosidl-typesupport-opensplice-cpp',
                ]

                subs['BuildDepends'] += [
                    rosify_package_name(name, self.rosdistro)
                    for name in ROS2_VENDOR_TYPESUPPORT_DEPENDENCIES
                ]
        return subs
Пример #8
0
def get_subs(pkg, os_name, os_version, ros_distro):
    # No fallback_resolver provided because peer packages not considered.
    subs = generate_substitutions_from_package(
        pkg,
        os_name,
        os_version,
        ros_distro
    )
    subs['Package'] = rosify_package_name(subs['Package'], ros_distro)
    return subs
Пример #9
0
    def get_subs(self, package, debian_distro, releaser_history, native=False):
        def fallback_resolver(key, peer_packages, rosdistro=self.rosdistro):
            if key in peer_packages:
                return [
                    sanitize_package_name(rosify_package_name(key, rosdistro))
                ]
            return default_fallback_resolver(key, peer_packages)

        subs = generate_substitutions_from_package(
            package,
            self.os_name,
            debian_distro,
            self.rosdistro,
            self.install_prefix,
            self.debian_inc, [p.name for p in self.packages.values()],
            releaser_history=releaser_history,
            fallback_resolver=fallback_resolver)
        subs['Package'] = rosify_package_name(subs['Package'], self.rosdistro)

        # ROS 2 specific bloom extensions.
        # TODO(nuclearsandwich) explore other ways to enable these extensions, reduce their necessity,
        # or make them configurable rather than relying on distro names.
        if self.rosdistro in ['r2b2', 'r2b3', 'ardent', 'bouncy', 'crystal']:
            # Add ros-workspace package as a dependency to any package other
            # than ros_workspace and its dependencies.
            if package.name not in [
                    'ament_cmake_core', 'ament_package', 'ros_workspace'
            ]:
                workspace_pkg_name = rosify_package_name(
                    'ros-workspace', self.rosdistro)
                subs['BuildDepends'].append(workspace_pkg_name)
                subs['Depends'].append(workspace_pkg_name)

            # Add packages necessary to build vendor typesupport for rosidl_interface_packages to their
            # build dependencies.
            if self.rosdistro in ['bouncy', 'crystal'] and \
                    'rosidl_interface_packages' in [p.name for p in package.member_of_groups]:
                ROS2_VENDOR_TYPESUPPORT_DEPENDENCIES = [
                    'rmw-connext-cpp',
                    'rmw-fastrtps-cpp',
                    'rmw-implementation',
                    'rmw-opensplice-cpp',
                    'rosidl-typesupport-connext-c',
                    'rosidl-typesupport-connext-cpp',
                    'rosidl-typesupport-opensplice-c',
                    'rosidl-typesupport-opensplice-cpp',
                ]

                subs['BuildDepends'] += [
                    rosify_package_name(name, self.rosdistro)
                    for name in ROS2_VENDOR_TYPESUPPORT_DEPENDENCIES
                ]
        return subs
Пример #10
0
def get_subs(pkg, os_name, os_version, ros_distro):
    # No fallback_resolver provided because peer packages not considered.
    subs = generate_substitutions_from_package(
        pkg,
        os_name,
        os_version,
        ros_distro
    )
    subs['Package'] = rosify_package_name(subs['Package'], ros_distro)
    # Override LibDir to not use multiarch with ROS releases
    subs['LibDir'] = 'lib'
    return subs
Пример #11
0
def get_subs(pkg, os_name, os_version, ros_distro, native):
    # No fallback_resolver provided because peer packages not considered.
    subs = generate_substitutions_from_package(
        pkg,
        os_name,
        os_version,
        ros_distro,
        RosDebianGenerator.default_install_prefix + ros_distro,
        native=native
    )
    subs['Package'] = rosify_package_name(subs['Package'], ros_distro)
    return subs
Пример #12
0
def get_subs(pkg,
             os_name,
             os_version,
             ros_distro,
             native=False,
             skip_package_names=None):
    print(traceback.format_exc())
    return generate_substitutions_from_package(
        pkg,
        os_name,
        os_version,
        ros_distro,
        native=native,
        skip_package_names=skip_package_names)
Пример #13
0
    def get_subs(self, package, debian_distro, releaser_history, native=False):
        def fallback_resolver(key, peer_packages, rosdistro=self.rosdistro):
            if key in peer_packages:
                return [sanitize_package_name(rosify_package_name(key, rosdistro))]
            return default_fallback_resolver(key, peer_packages)
        subs = generate_substitutions_from_package(
            package,
            self.os_name,
            debian_distro,
            self.rosdistro,
            self.install_prefix,
            self.debian_inc,
            [p.name for p in self.packages.values()],
            releaser_history=releaser_history,
            fallback_resolver=fallback_resolver
        )
        subs['Package'] = rosify_package_name(subs['Package'], self.rosdistro)

        # ROS 2 specific bloom extensions.
        ros2_distros = [
            name for name, values in get_index().distributions.items()
            if values.get('distribution_type') == 'ros2']
        if self.rosdistro in ros2_distros:
            # Add ros-workspace package as a dependency to any package other
            # than ros_workspace and its dependencies.
            if package.name not in ['ament_cmake_core', 'ament_package', 'ros_workspace']:
                workspace_pkg_name = rosify_package_name('ros-workspace', self.rosdistro)
                subs['BuildDepends'].append(workspace_pkg_name)
                subs['Depends'].append(workspace_pkg_name)

            # Add packages necessary to build vendor typesupport for rosidl_interface_packages to their
            # build dependencies.
            if self.rosdistro in ros2_distros and \
                    self.rosdistro not in ('r2b2', 'r2b3', 'ardent') and \
                    'rosidl_interface_packages' in [p.name for p in package.member_of_groups]:
                ROS2_VENDOR_TYPESUPPORT_DEPENDENCIES = [
                    'rmw-connext-cpp',
                    'rmw-fastrtps-cpp',
                    'rmw-implementation',
                    'rmw-opensplice-cpp',
                    'rosidl-typesupport-connext-c',
                    'rosidl-typesupport-connext-cpp',
                    'rosidl-typesupport-opensplice-c',
                    'rosidl-typesupport-opensplice-cpp',
                ]

                subs['BuildDepends'] += [
                    rosify_package_name(name, self.rosdistro) for name in ROS2_VENDOR_TYPESUPPORT_DEPENDENCIES]
        return subs
Пример #14
0
 def get_subs(self, package, debian_distro, releaser_history):
     def fallback_resolver(key, peer_packages, rosdistro=self.rosdistro):
         if key in peer_packages:
             return [sanitize_package_name(rosify_package_name(key, rosdistro))]
         return default_fallback_resolver(key, peer_packages)
     subs = generate_substitutions_from_package(
         package,
         self.os_name,
         debian_distro,
         self.rosdistro,
         self.install_prefix,
         self.debian_inc,
         [p.name for p in self.packages.values()],
         releaser_history=releaser_history,
         fallback_resolver=fallback_resolver
     )
     subs['Package'] = rosify_package_name(subs['Package'], self.rosdistro)
     return subs
Пример #15
0
 def get_subs(self, package, debian_distro, releaser_history, native=False):
     def fallback_resolver(key, peer_packages, rosdistro=self.rosdistro):
         if key in peer_packages:
             return [sanitize_package_name(rosify_package_name(key, rosdistro))]
         return default_fallback_resolver(key, peer_packages)
     subs = generate_substitutions_from_package(
         package,
         self.os_name,
         debian_distro,
         self.rosdistro,
         self.install_prefix,
         self.debian_inc,
         [p.name for p in self.packages.values()],
         releaser_history=releaser_history,
         fallback_resolver=fallback_resolver
     )
     subs['Package'] = rosify_package_name(subs['Package'], self.rosdistro)
     return subs