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

Cache overwritten by package from different platform. #1014

Open
ruben-arts opened this issue Jan 7, 2025 · 0 comments
Open

Cache overwritten by package from different platform. #1014

ruben-arts opened this issue Jan 7, 2025 · 0 comments

Comments

@ruben-arts
Copy link
Collaborator

Note

This is an edge case I stumbled upon when testing out pixi build which will be fixed separately, but it shows a limitation of our cache implementation.

When downloading files to the cache for platform x and later for platform y it might unnoticeably incorrect overwrite the file or not overwrite when needed.

The exact example to recreate this is installing _openmp_mutex-4.5-2_gnu on Windows, but from the linux-64 platform. Which has a symlink in the package to libomp.so.1that doesn't work on Windows, creating the error that linking failed.

  × failed to link _openmp_mutex-4.5-2_gnu.conda
  ├─▶ failed to link 'lib/libgomp.so.1'
  ├─▶ failed to copy file to destination
  ╰─▶ failed to copy file from C:\Users\x\AppData\Local\rattler\cache\pkgs\_openmp_mutex-4.5-2_gnu\lib/libgomp.so.1 to C:\Users\x\examples\b\.pixi\envs\default\lib/libgomp.so.1: 
      The system cannot find the file specified. (os error 2)

Overwriting the cache if the package identifier is exactly the same (name, version, build, extension) is an implementation that is copied from how conda and mamba implemented their cache. This would result in always overwriting the cache when cross-platform installing on the same system.

This could be improved by folding the different cache files into different subdirectories based on platform to avoid this issue.

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

No branches or pull requests

1 participant