My initial reaction was, "This way lies madness," but apparently there is some precedent for this feature in package managers. From the <a href="http://www.debian.org/doc/debian-policy/ch-relationships.html">Debian Manual</a>:<br>
<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">In the <samp>Depends</samp>, <samp>Recommends</samp>, <samp>Suggests</samp>,
<samp>Pre-Depends</samp>, <samp>Build-Depends</samp> and
<samp>Build-Depends-Indep</samp> 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
<samp>|</samp>.  In such a case, if any one of the alternative packages is
installed, that part of the dependency is considered to be satisfied.<br></blockquote><br>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.<br>
<br>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?).<br><br>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?<br>
<br>Cheers,<br>Patrick<br><br><div class="gmail_quote">On Fri, Nov 18, 2011 at 11:31 AM, Dirk Thomas <span dir="ltr"><<a href="mailto:mail@dirk-thomas.net">mail@dirk-thomas.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
while working on the ROS GUI SIG we think we found certain features to be missing for the ROS package dependency mechanism.<br>
We have a package which needs at least one of two specific dependencies in order to work (i.e. PyQt binding or PySide bindings).<br>
<br>
Specifying both dependencies would be bad as some users might not want to install both bindings (since either one would be sufficient).<br>
Specifying no dependency would lead to a package which does not work if no bindings are available at all (making the dependency checks useless).<br>
<br>
What we would need is to specify that the package has the dependency A "or" B.<br>
<br>
Actually A and B might even consist of multiple packages (i.e. A would be: PyQt bindings + PyQt bindings for OpenGL + whatever).<br>
So it might be necessary to specify dependencies like:<br>
(A1 && A2 && A3) || (B1 && B2)<br>
<br>
What are your thoughts on this?<br>
Is this already possible, or would it be a feasible enhancement?<br>
<br>
Dirk<br>
______________________________<u></u>_________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/<u></u>listinfo/ros-users</a><br>
</blockquote></div><br>