Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure that recursive dependencies are not reflexive #4804

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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