ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

How to create dependencies on specific version of a package

asked 2015-04-23 16:02:27 -0500

Jarvis gravatar image

Hi,

recently I faced issues due to changes in rosapi version installed by standard ros installation command.

sudo apt-get install ros-indigo-desktop-full

In the new version the name of rosapi package executable is changed. Is there any way where I can specify external package version my package depends on?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2015-04-24 02:00:56 -0500

gvdhoorn gravatar image

updated 2015-04-24 02:02:56 -0500

This is documented in REP-127 (for pkg format 1) and REP-140 for pkg format 2. From the build-depend (multiple) section:

All dependencies and relationships may restrict their applicability to particular versions. For each comparison operator an attribute can be used. Two of these attributes can be used together to describe a version range.

version_lt="VERSION" (optional)

The dependency to the package is restricted to versions less than the stated version number.

version_lte="VERSION" (optional)

The dependency to the package is restricted to versions less or equal than the stated version number.

version_eq="VERSION" (optional)

The dependency to the package is restricted to a version equal than the stated version number.

version_gte="VERSION" (optional)

The dependency to the package is restricted to versions greater or equal than the stated version number.

version_gt="VERSION" (optional)

The dependency to the package is restricted to versions greater than the stated version number.

This is for pkg format 1, but it is the same for format 2.

However, as far as I can tell, I don't think you can use this for your specific use case:

In the new version the name of rosapi package executable is changed. Is there any way where I can specify external package version my package depends on?

While you can specify that your my-pkg-A.B depends on some-pkg-X.Y, there is no way for users installing from the current package repositories to actually retrieve that version as soon as some-pkg has been updated (say to version X.Z). Only a single version is ever retained on the package repositories, so some-pkg-X.Z, the latest. Specifying a version_eq (or version_lt) requirement will now result in your my-pkg-A.B being uninstallable, as its dependencies cannot be satisfied (ie: there is no longer a some-pkg-X.Y on the servers which is needed for my-pkg-A.B).

edit flag offensive delete link more

Comments

Thats what I imagined. Thank you for confirming this.

Jarvis gravatar image Jarvis  ( 2015-04-24 17:46:41 -0500 )edit

It would however prevent users from installing your package and then finding out it doesn't work. In some scenarios, that is better than not checking at all. Also: for from-source installs this would work, as you can just checkout a specific version / tag.

gvdhoorn gravatar image gvdhoorn  ( 2015-04-25 01:49:19 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-04-23 16:02:27 -0500

Seen: 1,347 times

Last updated: Apr 24 '15