[OE-core] [PATCH v2 1/9] kmod: fix link creation when base_bindir != /bin
Richard Purdie
richard.purdie at linuxfoundation.org
Fri Sep 4 22:11:36 UTC 2015
On Fri, 2015-09-04 at 15:59 +0100, Joshua Lock wrote:
> If base_bindir is not a direct child of / the link creation in
> do_install_append creates incorrect relative links.
>
> Instead pass a full path to the link source and use the -r flag
> to ln to ensure the link is relative.
>
> Signed-off-by: Joshua Lock <joshua.lock at collabora.co.uk>
> ---
> meta/recipes-kernel/kmod/kmod_git.bb | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb
> index ba4d85e..120fd87 100644
> --- a/meta/recipes-kernel/kmod/kmod_git.bb
> +++ b/meta/recipes-kernel/kmod/kmod_git.bb
> @@ -21,9 +21,9 @@ do_install_append () {
> install -dm755 ${D}${base_bindir}
> install -dm755 ${D}${base_sbindir}
> # add symlinks to kmod
> - ln -s ..${base_bindir}/kmod ${D}${base_bindir}/lsmod
> + ln -sr ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod
> for tool in insmod rmmod depmod modinfo modprobe; do
> - ln -s ..${base_bindir}/kmod ${D}${base_sbindir}/${tool}
> + ln -sr ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool}
> done
> # configuration directories
> install -dm755 ${D}${base_libdir}/depmod.d
Not all our build machines appear to support ln -r, e.g.:
https://autobuilder.yoctoproject.org/main/builders/nightly-x32/builds/479/steps/BuildImages/logs/stdio
(debian7)
We do however have a python script called "lnr" in scripts which might
help...
Cheers,
Richard
More information about the Openembedded-core
mailing list