← Back to issue list

Migrated files don't follow symlinks if they're hard linked

View original Launchpad issue

Metadata

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

Current evaluation

Closed without resolution. Snapcraft's hard link migration creates broken symlinks due to Python's os.link() behavior, but no workaround was implemented.

Suggested action:

No scores available.

Issue body

Much of Snapcraft's responsibilities involve chauffeuring files around. It does this as efficiently as possible by using hard links. However, Python's os.link() doesn't actually follow symlinks even if follow_symlinks=True, which means it's possible to get broken symlinks into snaps as a result. Snapcraft should work around this.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without resolution. Snapcraft's hard link migration creates broken symlinks due to Python's os.link() behavior, but no workaround was implemented.
qwen/qwen3.6-35b-a3b Abandoned and closed without resolution. The reported bug where Snapcraft hard links fail to follow symlinks remains unfixed.
qwen/qwen3.6-35b-a3b Closed without resolution. The reported hard link and symlink handling bug in Snapcraft was abandoned due to inactivity. No fix or workaround was implemented.
qwen3.6-35b-a3b-mtp-q6 Abandoned. Snapcraft's hard link migration fails to follow symlinks, risking broken symlinks in generated snaps. The issue was closed without resolution or workaround due to prolonged inactivity.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#478 Follow symlinks while hard-linking migrated files. snapcraft merged Merged fix for broken symlinks during Snapcraft file migration. Replaced os.link() with os.path.realpath() to properly follow symlinks, resolving Launchpad bug 1572664. Two files changed, +51/-3 lines.
81%
#1650686 Some symlinks not properly fixed up snapcraft (launchpad) closed Abandoned. Closed without comments or resolution. The snapcraft build failure caused by unpatched absolute symlinks remains unresolved, with no fix implemented.
73%