#16616·conda

Configure soft links and read-only behavior per package cache

Author: jezdezCreated Sep 2, 2026Updated Sep 30, 2026
Labelstype::feature

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

Allow individual package caches in pkgs_dirs to control:

  • how packages from that cache are linked into environments
  • whether conda may modify that cache

A read-only cache may provide packages that are already extracted, but conda must not download, extract, repair, remove, or clean packages there. Cache misses should go to the first later cache that is not marked read-only and is actually writable.

The exact configuration format is open. Existing string entries in pkgs_dirs must remain valid and keep their current order and behavior.

Why is this needed?

Group-managed installations may use a shared administrator-managed cache, soft-link its packages into environments on another filesystem, and use a personal writable cache for later installs. CVMFS has a related need because hard links created while staging a publication become separate files after publication.

The global always_softlink and allow_softlinks settings cannot express different behavior for shared and personal caches. Filesystem permissions also do not always express whether an administrator intends conda to modify a cache.

Package-cache soft links still need care. Cleaning or moving a cache can break environments, and resolving executables through cache links can break $ORIGIN-relative RPATHs. See #16614, #10999, and #864.

#16615 protects cache packages referenced by environments conda can discover during cleanup. It does not configure per-cache behavior or protect environments conda cannot discover.

What should happen?

  • Apply the link policy of the cache that supplies the extracted package.
  • Support forcing soft links, using them only when hard links fail, disabling them, and inheriting the current default.
  • Treat an explicit read-only setting as a ban on cache mutations, even when filesystem permissions allow writes.
  • Never treat configuration as permission to write when the filesystem denies it.
  • Define which cache supplies a package when the same extracted package exists in more than one cache.
  • Continue handling existing LinkType.softlink records and symbolic links contained within packages.
  • Validate the design against the group-managed and CVMFS workflows before implementation.

Deprecating the global soft-link settings should be a separate decision after a replacement exists and affected deployments have migration guidance.

Additional Context

See Matthew's description of the current workflow, the original CVMFS request, and the current determine_link_type() implementation.