Skip to content

Add support for version_eq #803

@yotabits

Description

@yotabits

According to https://www.ros.org/reps/rep-0127.html#build-depend-multiple
Pacakge.xml supports version for dependencies.

I made an attempt to add support for version_eq here

with the following package.xml:

<?xml version="1.0"?>
<package format="2">
  <name>foo</name>
  <version>0.0.0</version>
  <description>The foo package</description>
  <maintainer email="tkostas@todo.todo">tkostas</maintainer>
  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>

  <depend version_eq="0.6.5-0bionic.20210112.183245">tf2_ros</depend>

</package>

Modified rosdep give me this output

rosdep install --from-paths ~/rosdep_ws/src/ --ignore-src -r -y --reinstall -y -s
#[apt] Installation commands:
  sudo -H apt-get install -y ros-melodic-tf2-ros=0.6.5-0bionic.20210112.183245

Even my approach is very clumsy it seems to work to some extent. Now I would like to make it more robust.

To do so I think it will necessitate some refactoring of the existing code, here is what I can think of:

  • Keep a generic installer class working similarly to the actual one
  • For installers supporting versions as they manages versions differently we will probably need a class per installer.
  • An installer object will manage a list of dependency objects specific to that installer
  • It would be probably a good idea to carry objects in the return value of resolve_all (resolution_flat) (in Rosdeplookup.resolve_all()) something like
[ (installer_name, [Dependecy_object_with_additions]) ]

instead of what we have atm

[ (installer_name, [string_to_install_by installer] )]

Does this sound like a reasonable approach? what would you suggest?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions