Skip to content

Cannot download due to hard link #161

@Philogag

Description

@Philogag

Describe the bug
Cannot download on openSUSE with btrfs filesystem

To Reproduce
It seems casued by hard link

{
  "name": "PyGObject",
  "version": "3.52.3",
  "link": {
    "url": "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/4a/36/fec530a313d3d48f12e112ac0a65ee3ccc87f385123a0493715609e8e99c/pygobject-3.52.3.tar.gz",
    "comes_from": "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/pygobject/",
    "yank_reason": null,
    "requires_python": "<4.0,>=3.9",
    "metadata": null
  },
  "local_path": "vendor/pygobject-3.52.3"
}
Traceback (most recent call last):
  File "/home/yuhr/.local/bin/unearth", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/yuhr/.local/share/pipx/venvs/unearth/lib64/python3.11/site-packages/unearth/__main__.py", line 189, in cli
    data["local_path"] = finder.download_and_unpack(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yuhr/.local/share/pipx/venvs/unearth/lib64/python3.11/site-packages/unearth/finder.py", line 452, in download_and_unpack
    file = unpack_link(
           ^^^^^^^^^^^^
  File "/home/yuhr/.local/share/pipx/venvs/unearth/lib64/python3.11/site-packages/unearth/preparer.py", line 372, in unpack_link
    os.replace(artifact, target_file)
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmpqjn8d38qunearth-download-/setuptools-80.9.0-py3-none-any.whl' -> 'vendor/setuptools-80.9.0-py3-none-any.whl'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions