Permalink
Browse files

Merge branch 'master' of https://github.com/OCamlPro/opam into darcs-…

…backend
  • Loading branch information...
2 parents 34852c8 + 6ad6b53 commit 5f6827f3f174363f5eefc5c73125606bd2c98440 @venator committed Dec 18, 2012
Showing with 13 additions and 6 deletions.
  1. +8 −5 src/client/opamSolution.ml
  2. +5 −1 src/client/opamSwitchCommand.ml
View
@@ -66,11 +66,14 @@ let proceed_to_install t nv =
let local_sections = OpamFile.Dot_config.Section.available config in
let libraries_in_opam =
OpamFormula.fold_left (fun accu (n,_) ->
- let nv = OpamState.find_installed_package_by_name t n in
- let opam = OpamState.opam t nv in
- let libs = OpamFile.OPAM.libraries opam in
- let syntax = OpamFile.OPAM.syntax opam in
- List.fold_right OpamVariable.Section.Set.add (libs @ syntax) accu
+ if OpamState.mem_installed_package_by_name t n then (
+ let nv = OpamState.find_installed_package_by_name t n in
+ let opam = OpamState.opam t nv in
+ let libs = OpamFile.OPAM.libraries opam in
+ let syntax = OpamFile.OPAM.syntax opam in
+ List.fold_right OpamVariable.Section.Set.add (libs @ syntax) accu
+ ) else
+ accu
) OpamVariable.Section.Set.empty (OpamFile.OPAM.depends opam_) in
let libraries_in_config =
List.fold_left (fun accu s ->
@@ -25,7 +25,11 @@ let list () =
let t = OpamState.load_state () in
let descrs = OpamState.compilers t in
- let descr c = OpamFile.Comp_descr.safe_read (OpamPath.compiler_descr t.root c) in
+ let descr c =
+ if c = OpamCompiler.default then
+ Printf.sprintf "System compiler (%s)" (OpamCompiler.Version.to_string t.compiler_version)
+ else
+ OpamFile.Comp_descr.safe_read (OpamPath.compiler_descr t.root c) in
let installed = "I" in
let current = "C" in

0 comments on commit 5f6827f

Please sign in to comment.