Skip to content

Commit 1f645b4

Browse files
Add UV_LINK_MODE=copy
Companion to canonical/craft-providers#900 When the cache dir is mounted from the LXD host, hardlinking from the global cache (uv's default behavior) is not possible e.g. ``` :: warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance. :: If the cache and target directories are on different filesystems, hardlinking may not be supported. :: If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning. ```
1 parent 71291d5 commit 1f645b4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

craft_parts/plugins/uv_plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,5 @@ def get_build_environment(self) -> dict[str, str]:
139139
"UV_PYTHON_DOWNLOADS": "never",
140140
"UV_PYTHON": '"${PARTS_PYTHON_INTERPRETER}"',
141141
"UV_PYTHON_PREFERENCE": "only-system",
142+
"UV_LINK_MODE": "copy",
142143
}

0 commit comments

Comments
 (0)