Ask Your Question
0

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:

foo/package.xml:
...
<replace>bar</replace>
...

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

Comments

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 imagegvdhoorn ( 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 imagegvdhoorn ( 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 imagerubicks ( 2019-03-06 09:32:46 -0500 )edit

Hm.

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 imagegvdhoorn ( 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 imagerubicks ( 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 imagegvdhoorn ( 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 imagegvdhoorn ( 2019-03-06 10:52:14 -0500 )edit

Submitted issue asking for clarification: https://github.com/ros-infrastructure...

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

1 Answer

Sort by ยป oldest newest most voted
2

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

Comments

@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 imagerubicks ( 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 imagegvdhoorn ( 2019-03-06 12:50:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 63 times

Last updated: Mar 06