opam
                                
                                 opam copied to clipboard
                                
                                    opam copied to clipboard
                            
                            
                            
                        Race condition when downloading the same archive twice at the same time
On rare occasions, the cache will be written in at the same time and the following error appears:
#=== ERROR while fetching sources for utop.2.12.0 =============================#
OpamSolution.Fetch_fail("/usr/bin/opam: \"symlink\" failed on /home/opam/.opam/download-cache/sha256/ad/ad19c859a783bec573cd91e810c54d0e6b70f339d0a4fed55ec672ae408aa1ea: File exists")
Steps to reproduce:
- Clear the cache
- Create two switches
- Exec opam install --switch <switch-1> <pkg> & ; opam install --switch <switch-2> <pkg> & ; wait
- Reapeat until one breaks
Version: dbe3066b720e57d8e288e73294999c0b594b2ab0
from dev meeting: we need to handle the exception. If file exists, checks that it is the good one.