Skip to content
Open
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
16 changes: 9 additions & 7 deletions src/client/opamSolution.ml
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,14 @@ let parallel_apply t
| Left conf ->
add_to_install nv conf;
store_time ();
if not OpamClientConfig.(!r.keep_build_dir) then begin
(* NOTE: build_dir as defined above is the
"build dir in case of --inplace" so != OpamPath.Switch.build *)
let build_dir =
OpamPath.Switch.build t.switch_global.root t.switch nv
in
OpamFilename.rmdir build_dir;
end;
Done (`Successful (OpamPackage.Set.add nv installed, removed))
| Right exn ->
store_time ();
Expand Down Expand Up @@ -868,13 +876,7 @@ let parallel_apply t
| `Remove nv ->
OpamAction.cleanup_package_artefacts t nv
(* if reinstalled, only removes build dir *)
| `Install nv ->
if not OpamClientConfig.(!r.keep_build_dir) then
let build_dir =
OpamPath.Switch.build t.switch_global.root t.switch nv
in
OpamFilename.rmdir build_dir
| `Build _ | `Fetch _ -> ()
| `Build _ | `Fetch _ | `Install _ -> ()
| `Change _ | `Reinstall _ -> assert false)
graph
in
Expand Down
Loading