[opam-devel] Finding dependencies of a specific OPAM package

Roberto Di Cosmo roberto at dicosmo.org
Mon Mar 23 16:43:59 GMT 2015

Computing the reverse dependency cone of a package P is just a matter of
visiting the dependency graph, and you do not need any call to the solver
for this. 

But this reverse dependency cone may very well contain packages not coinstallable with P.

For example, if you have

package: a
depends: cohttp, b

package: cohttp
version: 1
conflicts: b

package: cohttp
version: 2

Then a is a reverse dependency for both versions of cohttp, even if it is
coinstallable only with version 2.

If you want all packages in the reverse dependency cone of cohttp _that are also
coinstallable with it_, then you need to actually call the solver on each of


On Mon, Mar 23, 2015 at 04:27:47PM +0000, Anil Madhavapeddy wrote:
> I'm trying to find all the reverse dependency of a particular version of Cohttp.  I can do:
>     opam list --depends-on cohttp --rec
> to get all of the dependencies for all versions.  Unfortunately trying:
>     opam list --depends-on cohttp.0.15.2 --rec
> gives the same results (including packages that depend on earlier versions of Cohttp and are specifically not installable with cohttp.0.15.2)
> Any suggestions on how to resolve this?  I guess going through the list individually to check constraints is one way, but feely very clunky (and slow due to going through the solver so many times).
> -anil
> _______________________________________________
> opam-devel mailing list
> opam-devel at lists.ocaml.org
> http://lists.ocaml.org/listinfo/opam-devel

Roberto Di Cosmo
Professeur               En delegation a l'INRIA
PPS                      E-mail: roberto at dicosmo.org
Universite Paris Diderot WWW  : http://www.dicosmo.org
Case 7014                Tel  : ++33-(0)1-57 27 92 20
5, Rue Thomas Mann       
F-75205 Paris Cedex 13   Identica: http://identi.ca/rdicosmo
FRANCE.                  Twitter: http://twitter.com/rdicosmo
MIME accepted, Word deprecated
Office location:
Bureau 3020 (3rd floor)
Batiment Sophie Germain
Avenue de France
Metro Bibliotheque Francois Mitterrand, ligne 14/RER C
GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3                        

More information about the opam-devel mailing list