Skip to content

Make package-manager cache sharing request-scoped and configurable #1193

Description

@kartikjoshi21

What kind of request is this?

None

What is your request or suggestion?

Summary

Apt and RPM/TDNF cache mounts currently use locked sharing by default. This
serializes concurrent package installations that use the same cache ID.

A configurable sharing mode would allow CI and other high-concurrency users to
choose the appropriate trade-off between safety, parallelism, and disk usage.

Proposed behavior

Add a build argument such as:

DALEC_PACKAGE_CACHE_SHARING=locked|private|shared

The default must remain locked.

  • locked: safest default; serializes concurrent access.
  • private: avoids blocking by using isolated cache refs.
  • shared: allows concurrent access and should be documented as unsafe for
    package managers unless the user accepts possible corruption.

The setting must be request-scoped. It must not use process-global mutable state,
because multiple frontend requests may run concurrently.

Scope

  • Apt cache mounts.
  • DNF and TDNF cache mounts.
  • Native and cross-architecture package installation paths.

Are you willing to submit PRs to contribute to this feature request?

  • Yes, I am willing to implement it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions