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

package.xml: use 'replace' tag for non-ROS package

asked 2019-03-05 18:53:52 -0500

rubicks gravatar image

updated 2019-03-06 01:46:13 -0500

gvdhoorn gravatar image

When I do this:


I get this:

$ dpkg-deb --info ros-kinetic-foo_0.1.0_amd64.deb
 Replaces: ros-kinetic-bar

What do I do if I _don't_ want that ros-kinetic- prefix on the replaced package name?

edit retag flag offensive close merge delete


I believe that ros-kinetic- prefix is added there by the rosdebian generator in Bloom. I'm not sure it can be removed.

Perhaps @William can add something here.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 01:42:12 -0500 )edit

REP 127 does say this though (here):

Declares a rosdep key or ROS package name that your package replaces

"rosdep key" could only mean "system dependency" (ie: non-ROS pkg), so it would seem this should work.

Is bar a ROS pkg?

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 01:44:59 -0500 )edit

@gvdhoorn , in this example, bar need not be a ROS package. It's better (for my use case, at least) if bar is _not_ a ROS package. This would allow me to <replace> arbitrary packages by name and not just the proper subset of packages known to rosdep.

rubicks gravatar image rubicks  ( 2019-03-06 09:32:46 -0500 )edit


I can think of one reason why we would not want to do/support/allow this (but this is just me speculating): if arbitrary pkgs could be replaced that way, I would create a "rogue" package.xml, release it and replace any arbitrary pkg on a system. That wouldn't be very nice.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 09:53:43 -0500 )edit

...unless, of course, that was the desired behavior. Any person (or software tool) capable of creating and/or editing a debian/control file can effect package removal. Maintainers and system administrators are responsible for package hygiene and installation, respectively.

rubicks gravatar image rubicks  ( 2019-03-06 10:49:42 -0500 )edit

In principle I agree. But we have to remember that releasing a ROS pkg and getting it distributed through the package repositories to thousands of user's machines is way easier than getting something into Debian/Ubuntu -- which have stricter quality control mechanisms.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 10:51:51 -0500 )edit

But again: it was just me speculating.

What you've observed could just be a bug in the generator.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 10:52:14 -0500 )edit

Submitted issue asking for clarification:

rubicks gravatar image rubicks  ( 2019-03-06 11:20:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-06 11:43:16 -0500

Dirk Thomas gravatar image

The strings used for dependencies are not system packages. Every name is a rosdep key which is then resolves by the rosdep database to a actual package name. So even if your package is not a ROS package you need a rosdep key for it in order to be able to use it in the manifest.

edit flag offensive delete link more


@dirk-thomas, okay, that explains it. I'll see if I can work around this with some rosdep trickery and (if successful) post an answer. Thanks very much for clarifying.

rubicks gravatar image rubicks  ( 2019-03-06 11:45:38 -0500 )edit

I'd actually assumed that @rubicks was already using recognised rosdep keys, but if that wasn't the case then that would indeed explain it.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 12:50:05 -0500 )edit

Question Tools

1 follower


Asked: 2019-03-05 18:53:52 -0500

Seen: 261 times

Last updated: Mar 06 '19