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

Allow over-writing existing targets #339

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

kunalb
Copy link

@kunalb kunalb commented May 24, 2024

Description

Depending on the conda environment, the same file may be written to multiple times (eg. if a specific lib.so file exists, multiple conda packages may have it and at pack time conda-pack will pull from the cache'd original copy of the package and copy it in; when multiple packages have the same lib.so file they'll over-write each other).

shutil.copy2 doesn't handle overwriting existing symlinks cleanly: it overwrites files silently but fails on creating a symlink (probably worth a separate PR to cpython later). Allow for this by explicitly deleting existing targets.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
    • Doesn't seem important enough
  • Add / update necessary tests?
    • I'll just check what exists and update
  • Add / update outdated documentation?

Depending on the conda environment, the same file may be written to multiple times (eg. if a specific lib.so file exists, multiple conda packages may have it and at pack time conda-pack will pull from the cache'd original copy of the package and copy it in; when multiple packages have the same lib.so file they'll over-write each other).

shutil.copy2 doesn't handle overwriting existing symlinks cleanly: it overwrites files silently but fails on creating a symlink (probably worth a separate PR to cpython later). Allow for this by explicitly deleting existing targets.
@kunalb kunalb requested review from xhochy and a team as code owners May 24, 2024 22:41
@conda-bot
Copy link
Contributor

We require contributors to sign our Contributor License Agreement and we don't have one on file for @kunalb.

In order for us to review and merge your code, please e-sign the Contributor License Agreement PDF. We then need to manually verify your signature, merge the PR (conda/infrastructure#946), and ping the bot to refresh the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

2 participants