Skip to content

Rewrite xorg.lndir #27

@viperML

Description

@viperML

Symlinkjoin, which wrapper-manager uses internally, uses xorg.lndir.

It has a problem: it doesn't recurse into symlinks that point to directories, but rather just symlink the symlink itself.

This is what you would expect from this tool, but for the use-case of wrapper-manager it makes it harder for patching files, as you have to "unwind" the nested symlinks to be able to have a mutable directory, instead of a symlink to a directory:

# Some derivations have nested symlinks here
if [[ -d $out/share/applications && ! -w $out/share/applications ]]; then
echo "Detected nested symlink, fixing"
temp=$(mktemp -d)
cp -v $out/share/applications/* $temp
rm -vf $out/share/applications
mkdir -pv $out/share/applications
cp -v $temp/* $out/share/applications
fi

Ideally we would have a lndir clone that can unwind symlinks, maybe only for share/applications/

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