Skip to content

Commit

Permalink
Merge pull request ocaml#2303 from OCamlPro/pending-fixes
Browse files Browse the repository at this point in the history
Small changes & fixes that I had stashed locally
  • Loading branch information
AltGr committed Sep 19, 2015
2 parents 78fb785 + 5804362 commit 23e0ca9
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions admin-scripts/to_1_1.ml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ let rec filter_vars = function
| FOp (f1,op,f2) ->
(match filter_vars f1, filter_vars f2 with
| Some f1, Some f2 -> Some (FOp (f1, op, f2))
| _ -> None)
| _ -> Some (FBool false))
| FAnd (f1,f2) ->
(match filter_vars f1, filter_vars f2 with
| Some f1, Some f2 -> Some (FAnd (f1, f2))
| opt, None | None, opt -> opt)
| opt, None | None, opt -> Some (FBool false))
| FOr (f1,f2) ->
(match filter_vars f1, filter_vars f2 with
| Some f1, Some f2 -> Some (FOr (f1, f2))
Expand Down
3 changes: 1 addition & 2 deletions doc/pages/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ As a last resort, you can bypass the checksum checks using `--no-checksums`.
install 'PACKAGE>=VERSION' PACKAGE...`, etc.)
* Action resolution in a package set is known to be a NP-complete problem; OPAM
uses state-of-the-art algorithms through an external, dedicated solver: make
sure you have the latest version of [aspcud](http://potassco.sourceforge.net/)
installed.
sure you have [an external solver installed](Install.html#ExternalSolvers)
* Another benefit of the external solvers is that they allow to be [quite
expressive](Specifying_Solver_Preferences.html) on your expectations.

Expand Down
28 changes: 15 additions & 13 deletions doc/pages/Install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
> NOTE: 1.2.2 is just being released. It may take a few days before binary
> distributions catch up
# How to install OPAM

This page describes how to install and configure OPAM and [external
Expand Down Expand Up @@ -215,11 +212,16 @@ process to _external solvers_. OPAM integrates a simple solver, so it
can used without any extra dependencies, but for best results you
should have one of those solvers on your system:

- aspcud (recommended)
- packup
- mccs (no built-in support at the moment, but may be used with the following
solver configuration string: `mccs -i %{input}% -o %{output}%
-lexagregate[%{criteria}%]`.)
- [aspcud](http://www.cs.uni-potsdam.de/wv/aspcud/) (recommended)
- [packup](http://sat.inesc-id.pt/~mikolas/sw/packup/)
- [mccs](http://www.i3s.unice.fr/~cpjm/misc/mccs.html) (no built-in support at
the moment, but may be used with the following solver configuration string:
`mccs -i %{input}% -o %{output}% -lexagregate[%{criteria}%]`.)
- [p2Cudf](https://wiki.eclipse.org/Equinox/p2/CUDFResolver), which may be the
easiest if dependencies are a problem, as it comes as a single jar file.
[Dowload it](http://eclipse.org/equinox/p2/p2CUDF/org.eclipse.equinox.p2.cudf-1.14.jar)
and set the solver configuration string to
`java -jar <jarfile-location> -obj %{criteria}% %{input}% %{output}%`.

We recommend installing one through your packaging system whenever
possible: this should already have been taken care of if you installed
Expand All @@ -233,11 +235,11 @@ If you use the internal solver only, the following symptoms may be
sign that you need an external solver: very bad upgrade proposals, or
dependency solving becoming very slow.

OPAM will detect the availability of `aspcud` or `packup` commands on
your system and should switch to using them directly. You can
explicitly specify which external solver to use by using the `--solver
<foo>` command-line argument, or
`$OPAMEXTERNALSOLVER` environment variable.
OPAM will detect the availability of `aspcud` or `packup` commands on your
system and should switch to using them directly. You can explicitly specify
which external solver to use by using the `--solver` command-line argument, the
`$OPAMEXTERNALSOLVER` environment variable, or the `solver:` field in the
`~/.opam/config` file.

External solvers also allow to specify [fine-grained
preferences](Specifying_Solver_Preferences.html). `aspcud`
Expand Down
4 changes: 2 additions & 2 deletions doc/pages/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ opam install "ocamlfind>=1.4.0"
If OPAM seems unable to fulfill very simple installation requests or
propose non-sensical install plans, it may be due to limitations of
its internal dependency solver; you should check that you have an
[External dependency solver](Install.html#Externalsolvers) on your
[External dependency solver](Install.html#ExternalSolvers) on your
system.

### opam upgrade
Expand All @@ -97,7 +97,7 @@ packages from being upgraded.

If OPAM proposes non-sensical upgrade plans, it may be due to
limitations of its internal dependency solver; you should check that
you have an [External dependency solver](Install.html#Externalsolvers)
you have an [External dependency solver](Install.html#ExternalSolvers)
on your system.

### opam switch
Expand Down
2 changes: 1 addition & 1 deletion src/client/opamMain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ let check_and_run_external_commands () =
let pkgname = OpamPackage.Name.of_string name in
let candidates = Lazy.force t.available_packages in
let nv = OpamPackage.max_version candidates pkgname in
let opam = OpamPackage.Map.find nv t.opams in
let opam = OpamState.opam t nv in
if OpamFile.OPAM.has_flag Pkgflag_Plugin opam &&
not (OpamState.is_name_installed t pkgname) &&
OpamConsole.confirm "OPAM plugin %s is not installed. \
Expand Down

0 comments on commit 23e0ca9

Please sign in to comment.