Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix the repository the given package comes from.

Partially fix #556
  • Loading branch information...
commit ee74e267c99ac0ec6b0fbbc6b6ab097846a7f859 1 parent 1d31a38
Thomas Gazagnaire authored

Showing 1 changed file with 9 additions and 0 deletions. Show diff stats Hide diff stats

  1. +9 0 src/client/opamClient.ml
9 src/client/opamClient.ml
@@ -404,6 +404,14 @@ module API = struct
404 404 let nv = OpamPackage.create name current_version in
405 405 let opam = OpamState.opam t nv in
406 406
  407 + (* where does it come from (eg. which repository) *)
  408 + let repository =
  409 + if OpamRepositoryName.Map.cardinal t.repositories <= 1 then
  410 + []
  411 + else
  412 + let repo = OpamState.with_repository t nv (fun _ r -> r.repo_name) in
  413 + ["repository", OpamRepositoryName.to_string repo] in
  414 +
407 415 (* All the version of the package *)
408 416 let versions = OpamPackage.versions_of_name t.packages name in
409 417 let versions =
@@ -487,6 +495,7 @@ module API = struct
487 495 [ "package", OpamPackage.Name.to_string name ]
488 496 @ [ "version", OpamPackage.Version.to_string current_version ]
489 497 @ homepage
  498 + @ repository
490 499 @ authors
491 500 @ license
492 501 @ doc

0 comments on commit ee74e26

Please sign in to comment.
Something went wrong with that request. Please try again.