rattler icon indicating copy to clipboard operation
rattler copied to clipboard

feat: add support for md5 hash in direct url requests and add it to cache key

Open wolfv opened this issue 8 months ago • 2 comments

This would help a lot when installing explicit environments, because they usually come with md5 hashes (from the old days...).

The environments look something like this:

# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: osx-arm64
@EXPLICIT
https://conda.anaconda.org/conda-forge/osx-arm64/libcxx-20.1.1-ha82da77_0.conda#833c4899914bf96caf64b52ef415e319
https://conda.anaconda.org/conda-forge/osx-arm64/micromamba-1.5.12-0.tar.bz2#ef854aa57525cb8d9a87cc1f1d59bd92

From which we can construct matchspecs like:

libcxx[url="https://conda.anaconda.org/conda-forge/osx-arm64/libcxx-20.1.1-ha82da77_0.conda", md5="833c4899914bf96caf64b52ef415e319"]

Which rattler / py-rattler would then install perfectly fine.

cc @johanneskoester

wolfv avatar Mar 28 '25 09:03 wolfv

Did you also change writing the md5 to the cache lock file?

baszalmstra avatar Mar 28 '25 11:03 baszalmstra

That should happen since I add it to the CacheKey and we use the information from RepodataRecord if present (i think we fill it in if not present, when downloading).

wolfv avatar Mar 28 '25 11:03 wolfv

superseded by #1293

wolfv avatar May 16 '25 09:05 wolfv