OCamlPro/opam — pull request #182 by 0branch (2012-09-20 17:35:37+00:00)
Title: Distinguish between unknown and unavailable packages during installation.

The current error message is rather misleading. For example, when using OCaml 4.00.0:

$ opam install ocamlnet.3.5.1
The package "ocamlnet" has no version 3.5.1.
'opam install ocamlnet.3.5.1' failed

This changeset introduces checks for unavailable packages, yielding slightly clearer errors:

$ opam install ocamlnet.3.5.1
Version 3.5.1 of "ocamlnet" is incompatible with your compiler.
'opam install ocamlnet.3.5.1' failed

When the default package is incompatible, a similar message is printed:

$ rm ~/.opam/opam/ocamlnet.3.6.0.opam
$ opam install ocamlnet
"ocamlnet" is not available for your compiler.

'opam install ocamlnet' failed

Ideally this would be coupled with an update to `info` such that incompatibilities are clear prior to installation.