[ros-users] Alternative package dependencies

Patrick Mihelich mihelich at willowgarage.com
Fri Nov 18 21:22:08 UTC 2011


My initial reaction was, "This way lies madness," but apparently there is
some precedent for this feature in package managers. From the Debian
Manual<http://www.debian.org/doc/debian-policy/ch-relationships.html>
:

In the Depends, Recommends, Suggests, Pre-Depends, Build-Depends and
> Build-Depends-Indep control fields of the package, which declare
> dependencies on other packages, the package names listed may also include
> lists of alternative package names, separated by vertical bar (pipe)
> symbols |. In such a case, if any one of the alternative packages is
> installed, that part of the dependency is considered to be satisfied.
>

So maybe it is interesting to look at how this feature is used in deb
packages, and maybe rosdep for Ubuntu/Debian could piggyback on that
feature. I'm not sure what you'd do for other package managers that don't
natively support this. All that would need to be precisely specified.

The "&&" behavior I think is more usually implemented as a virtual package
or by simple dependencies (e.g. PyQt bindings for OpenGL would already
depend on PyQt bindings right?).

As always when making core stuff more complicated, make sure to ask, "How
badly do we really need this feature?" Is it so awful if the user ends up
with redundant packages installed?

Cheers,
Patrick

On Fri, Nov 18, 2011 at 11:31 AM, Dirk Thomas <mail at dirk-thomas.net> wrote:

> Hi,
>
> while working on the ROS GUI SIG we think we found certain features to be
> missing for the ROS package dependency mechanism.
> We have a package which needs at least one of two specific dependencies in
> order to work (i.e. PyQt binding or PySide bindings).
>
> Specifying both dependencies would be bad as some users might not want to
> install both bindings (since either one would be sufficient).
> Specifying no dependency would lead to a package which does not work if no
> bindings are available at all (making the dependency checks useless).
>
> What we would need is to specify that the package has the dependency A
> "or" B.
>
> Actually A and B might even consist of multiple packages (i.e. A would be:
> PyQt bindings + PyQt bindings for OpenGL + whatever).
> So it might be necessary to specify dependencies like:
> (A1 && A2 && A3) || (B1 && B2)
>
> What are your thoughts on this?
> Is this already possible, or would it be a feasible enhancement?
>
> Dirk
> ______________________________**_________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/**listinfo/ros-users<https://code.ros.org/mailman/listinfo/ros-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20111118/e1f9261d/attachment-0004.html>


More information about the ros-users mailing list