Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

On 'opam info' show when a package is pinned.

This can help debugging weird situation when we forgot that we've pinned some packages.
  • Loading branch information...
commit 83ce3bdb612a69b8adbaa9b9c81979810aacf795 1 parent 23c3455
@samoht authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/client/opamClient.ml
View
7 src/client/opamClient.ml
@@ -364,8 +364,13 @@ module API = struct
let installed =
OpamSwitch.Map.fold (fun switch _ map ->
let installed = OpamFile.Installed.safe_read (OpamPath.Switch.installed t.root switch) in
+ let pinned = OpamFile.Pinned.safe_read (OpamPath.Switch.pinned t.root switch) in
if OpamState.mem_installed_package_by_name_aux installed name then
- let nv = OpamState.find_installed_package_by_name_aux installed name in
+ let nv =
+ if OpamPackage.Name.Map.mem name pinned then
+ OpamPackage.create name (OpamPackage.Version.of_string "(pinned)")
+ else
+ OpamState.find_installed_package_by_name_aux installed name in
if OpamPackage.Map.mem nv map then
let aliases = OpamPackage.Map.find nv map in
let map = OpamPackage.Map.remove nv map in
Please sign in to comment.
Something went wrong with that request. Please try again.