Skip to content

Commit

Permalink
Make sure that recursive dependencies are not reflexive
Browse files Browse the repository at this point in the history
  • Loading branch information
LasseBlaauwbroek committed Aug 14, 2021
1 parent c8f8f74 commit 4e008f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ users)
*

## List
*
* Do not list the package itself when running `--depends-on` and `--required-by` with `--required` [#4804 @LasseBlaauwbroek]

## Show
*
Expand Down
7 changes: 4 additions & 3 deletions src/client/opamListCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,11 @@ let apply_selector ~base st = function
| Depends_on _ -> OpamSolver.reverse_dependencies
| _ -> assert false
in
deps_fun ~depopts:tog.depopts ~build:tog.build ~post:tog.post
let packages = packages_of_atoms st atoms in
let deps = deps_fun ~depopts:tog.depopts ~build:tog.build ~post:tog.post
~installed:false ~unavailable:true
(get_universe st tog)
(packages_of_atoms st atoms)
(get_universe st tog) packages in
OpamPackage.Set.diff deps packages
| Required_by (tog, atoms) ->
atom_dependencies st tog atoms |>
OpamFormula.packages base
Expand Down

0 comments on commit 4e008f8

Please sign in to comment.