dephell / dephell_archive

Pathlib for archives
MIT License
1 stars 6 forks source link

Two archives can overwrite each others cache entries #17

Open jayvdb opened 4 years ago

jayvdb commented 4 years ago

As the archive name / hash isnt in the cache directory naming, two different archives with the same internal paths can overwrite each other.

This is especially problematic for two wheels of different versions/platforms of the same package, as they are likely to have the same directory name for the installed code. i.e. dephell-0.1.0 and dephell-0.2.0 wheels both contain dephell/.

jayvdb commented 4 years ago

I guess that dephell is doing cache conflict avoidance elsewhere. It would be nice to bring it into this project, or otherwise document (more clearly) that the caller needs to provide a unique cache dir for each archive.

I actually like the current mode for the project I am working on, as it is only sdists which all have a unique-ish top level dir in the sdist. So if this is going to be fixed, it would be great to support a few cache modes.