← Back to issue list

stage-package cache doesn't work on encrypted home if building snap outside of home

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1612813
Type
issue
State
closed
Author
~kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

stage-package (deb) cache used hard links, breaking on encrypted homes across filesystem boundaries. Fixed by merged canonical/snapcraft PR #728 (commit 3d1835b5d), which switched the cache to common.link_or_copy with a copy fallback.

Resolution: closed resolved

Reason: Maintainer sergiusens linked PR #728, which merged as commit 3d1835b5d replacing the deb cache hard links with link_or_copy so the cache works across filesystem boundaries; the Launchpad bug was closed with that reference.

Evaluated by: mr-cal-bot

No scores available.

Issue body

An encrypted home is a filesystem boundary. As such, one cannot hard-link across it. However, the stage-package cache uses hard links (repo.py, line 206). Since this was one of the reasons common.link_or_copy was created, it should likely be using that instead.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved stage-package (deb) cache used hard links, breaking on encrypted homes across filesystem boundaries. Fixed by merged canonical/snapcraft PR #728 (commit 3d1835b5d), which switched the cache to common.link_or_copy with a copy fallback.
stealth/space-bunny-alpha — closed resolved Fixed by merged canonical/snapcraft#728 (3d1835b5d), which replaced stage-package cache hard links with link_or_copy and copy fallback across filesystem boundaries.
stealth/space-bunny-alpha — closed resolved Fixed in canonical/snapcraft#728 (3d1835b5d): the package cache now uses link_or_copy, falling back to copying across filesystem boundaries.
qwen/qwen3.6-35b-a3b — — Abandoned. The stage-package cache fails on encrypted home directories because hard links cannot cross filesystem boundaries. The suggested fix to use common.link_or_copy was never implemented.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The stage-package cache fails on encrypted home directories due to hard link restrictions across filesystem boundaries. A switch to common.link_or_copy was suggested, but no fix or follow-up was provided.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The report identified that the stage-package cache fails on encrypted home directories because hard links cannot cross filesystem boundaries, recommending a switch to common.link_or_copy.
qwen3.6-35b-a3b-mtp-q6 — — The stage-package cache fails on encrypted home directories because hard links cannot cross filesystem boundaries. The report was closed without resolution, indicating it was abandoned.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#728 (confidence 97%)

    PR 'Use link_or_copy instead of just hard-links for deb cache.' merged as 3d1835b5d and cited in the closing comment by sergiusens

Related issues

Issue Project State Summary Similarity
#1661383 stage package cache no longer working snapcraft (launchpad) closed Stage-package cache reuse was restored: snapcraft PR #1122 (commit 20b422459, 'repo: cache stage packages for faster future use') merged, reusing cached debs and copying the apt cache into cleanbuild containers, closing LP #1661383.
79%