JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
613 stars 251 forks source link

Ignore artifact hash mismatch if we cannot create symlinks on Windows and the tarball has symlinks #3749

Closed nhz2 closed 5 months ago

nhz2 commented 6 months ago

Fixes #3643 using @staticfloat's approach in https://github.com/JuliaLang/Pkg.jl/issues/3643#issuecomment-1880111897

This PR moves the decision of whether to copy symlinks from https://github.com/JuliaIO/Tar.jl/blob/6269b5b8c4c863b1fe2beef53666273e3bbc021b/src/Tar.jl#L244-L246 and https://github.com/JuliaLang/Pkg.jl/blob/3c86ba27e904807e13beb8cb0466ed70365b0b2d/src/PlatformEngines.jl#L385-L390 to inside the download_artifact function.

It also modifies download_verify_unpack to output which symlinks were not able to be created.

The error message added in #3745 is logged if there is a hash mismatch and symlinks were changed, but it is not an error, instead, the artifact is moved to the expected location.