Open baszalmstra opened 1 year ago
any updates?
This is not being worked on atm. Contributions are welcome!
@baszalmstra hey, I'm trying to work out a PR for this. Do we need to enforce the user to have strictly one writable cache directory?
pkgs_dirs=dals(
"""
The list of directories where locally-available packages are linked from at
install time. Packages not locally available are downloaded and extracted
into the first writable directory.
"""
)
Seems like multiple writable package caches are allowed. Packages are both downloaded and extracted to the first writable cache
Consider the scenario where you have a multi-user linux machine with a system-wide rattler package cache. This system-wide cache is read-only to users, and only writable by the system admin. e.g. normal user alice
has RW access to /home/alice/.cache/rattler/cache, but only R access to /.cache/rattler/cache (I think where this system-wide cache dir is located is arbitrary?).
If a system admin bob
has their own local cache dir (e.g. /home/bob/.cache/rattler/cache), bob
would now have two writable caches. Enforcing strictly one writable cache would break this.
I think a user could have more than one writable cache, but we should probably write to the "first" one. If we would have a nice API to list all available package caches, and those that are writable, it would be nice to be able to show that to users (e.g. with pixi info
).
@baszalmstra is also currently working on much improving the package cache concurrency.
Conda and Mamba both support having multiple cache directories. Rattler currently only supports a single directory. The "layered" cache can have multiple readable directories and only one writable directory. Conda/Mamba tries to write a magical file to all these directories at startup to determine which one is writable.
Rattler should also facilitate "layered" package caches. We could introduce a trait for
PackageCache
that is implemented for both the current implementation as well as a layered version.