Robotics StackExchange | Archived questions

How to check binary dependency during ROS Debian package installation

I'd like to check if binary dependencies have been installed when install my ROS Debian package (not Debian package dependency but a binary), or at least print information like "Please ensure xxx has been installed in your system" to guide users to manually resolve the dependencies before use my package. Is there anyone know how to get it supported for the ROS packages generated by bloom system? Through CMakeLists.txt?

Asked by cathyshen on 2018-06-22 02:51:16 UTC

Comments

Unless I misunderstand you: isn't this the responsibility of the package manager? If your deb package correctly states the dependency (in its control file), the pkg manager should check for it when it's installing your pkg and then print either an error or install the required dependency.

Asked by gvdhoorn on 2018-06-22 02:54:40 UTC

I was thinking the control file in release repo is generated by bloom automatically. E.g. https://github.com/ros2-gbp/vision_opencv-release/blob/debian/bouncy/cv_bridge/debian/control.em. Do you mean we can add binary deps in that file manually?

Asked by cathyshen on 2018-06-24 21:34:11 UTC

I was thinking the control file in release repo is generated by bloom automatically

It is. The accepted best practice is to state the dependency on the (.deb) pkg that provides the binary that your package depends on. If that is not possible, then things are more difficult.

Asked by gvdhoorn on 2018-06-25 03:15:21 UTC

Thank you, @gvdhoorn. I might run into that "complex" situation for some binaries I should manually installed but not through apt-get installation.

Asked by cathyshen on 2018-06-25 03:44:49 UTC

Yes, that is a limitation of the debian-focused/inspired build infrastructure that ROS currently uses (both 1 and 2).

Asked by gvdhoorn on 2018-06-25 03:45:52 UTC

Answers