Skip to content

pkgm fails when used with separate filesystems #7

@dehylton

Description

@dehylton

Running pkgm install on a system with separate filesystems does not currently work. For example, I have separate filesystems (zfs) for /usr, /root, and /home. This is what I get when attempting to install neovim via pkgm:

$ pkgm install neovim.io
warning: --json is not stable use --json=v1
error: Uncaught (in promise) Error: Invalid cross-device link (os error 18): link '/home/dewey/.pkgx/neovim.io/v0.10.3/share/locale/sk/LC_MESSAGES/nvim.mo' -> '/usr/local/pkgs/neovim.io/v0.10.3/share/locale/sk/LC_MESSAGES/nvim.mo'
      await Deno.link(sourcePath, targetPath);
      ^
    at async Object.link (ext:deno_fs/30_fs.js:443:3)
    at async processEntry (file:///usr/local/bin/pkgm:196:7)
    at async processEntry (file:///usr/local/bin/pkgm:192:9)
    at async processEntry (file:///usr/local/bin/pkgm:192:9)
    at async processEntry (file:///usr/local/bin/pkgm:192:9)
    at async processEntry (file:///usr/local/bin/pkgm:192:9)
    at async processEntry (file:///usr/local/bin/pkgm:192:9)
    at async mirror_directory (file:///usr/local/bin/pkgm:179:3)
    at async sudo_install (file:///usr/local/bin/pkgm:145:5)
    at async file:///usr/local/bin/pkgm:54:7

The same operation seems to work in a "big root" single-filesystem instance (such as as the case in a podman/docker container):

root@12b50b6ab237:/# pkgm install neovim.io
warning: --json is not stable use --json=v1

root@12b50b6ab237:/# which nvim
/usr/local/bin/nvim

root@12b50b6ab237:/# nvim --version
NVIM v0.10.3
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions