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

Use OCaml code to copy/move/remove directories instead of unix commands #4823

Merged
merged 5 commits into from
May 8, 2023

Conversation

kit-ty-kate
Copy link
Member

This should fix #1073 for good.
This also makes opam slightly more portable and not so much reliant on external processes (see e.g. #3217)

Warning for testers: This is untested code touching the file system. Only test this in a sandboxed environment.

@kit-ty-kate kit-ty-kate assigned dra27 and unassigned dra27 Aug 31, 2021
@kit-ty-kate kit-ty-kate requested a review from dra27 August 31, 2021 14:50
@rjbou rjbou added the PR: WIP Not for merge at this stage label Sep 2, 2021
@rjbou rjbou added this to the 2.2.0~alpha milestone Sep 2, 2021
copy_dir src dst
| {Unix.st_kind = Unix.S_LNK; _} ->
let src = Unix.readlink src in
link src dst
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src may need rewriting if relative to the srcdir, depending on whether the target is within the dir or not ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the link doesn't resolve to an existing id

@dra27 dra27 removed this from the 2.2.0~alpha milestone May 17, 2022
@kit-ty-kate kit-ty-kate force-pushed the unix-cmd-to-unix-calls branch from aa02169 to b42e336 Compare May 3, 2023 16:35
@kit-ty-kate kit-ty-kate added this to the 2.2.0~alpha milestone May 3, 2023
@kit-ty-kate kit-ty-kate removed the PR: WIP Not for merge at this stage label May 3, 2023
@kit-ty-kate kit-ty-kate force-pushed the unix-cmd-to-unix-calls branch from 7f3c3cf to a830fe5 Compare May 4, 2023 13:49
@rjbou rjbou force-pushed the unix-cmd-to-unix-calls branch from a830fe5 to 82ee215 Compare May 4, 2023 16:42
@rjbou rjbou requested review from rjbou and removed request for dra27 May 4, 2023 16:46
@kit-ty-kate kit-ty-kate merged commit 594e11d into ocaml:master May 8, 2023
@kit-ty-kate kit-ty-kate deleted the unix-cmd-to-unix-calls branch May 8, 2023 14:42
@rjbou rjbou mentioned this pull request Jun 15, 2023
16 tasks
@dra27 dra27 mentioned this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cp -pPR <src> <dst>
4 participants