]> git.ipfire.org Git - thirdparty/kmod.git/commit
meson: always pass complete path to kmod-symlink.sh
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 22 Oct 2024 20:28:27 +0000 (21:28 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 23 Oct 2024 15:54:41 +0000 (10:54 -0500)
commit844835cd9a4e5f08e1a3eefb4928c5d769264894
tree57916be5f3b28625d930f3015ca6244917181785
parent33e3d24cdb270cdfab71e9bd1c856e6430b3c11e
meson: always pass complete path to kmod-symlink.sh

The end-user can provide either relative (to prefix) or an absolute
directory for bindir. Just fold the prefix and bindir with join_path()
which handles this correctly and pass that to kmod-symlink.sh instead of
relying on the MESON_INSTALL_DESTDIR_PREFIX environment variable.

This was previously failing due to trying to create the symlink in the
wrong location:

$ meson setup --prefix /usr --bindir /bin build-gentoo
$ DESTDIR=/tmp/install-gentoo meson install -C build-gentoo/
...
ln: failed to create symbolic link '/tmp/install-gentoo/usr//bin/depmod': No such file or directory
FAILED: install script '/home/ldmartin/p/kmod/scripts/kmod-symlink.sh /bin/depmod' failed with exit code 1.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/205
[ fix typo, add repro ]
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
meson.build
scripts/kmod-symlink.sh