Re: How to create symlink while installing binary in recipe?

Khem Raj

On Tue, Oct 11, 2022 at 9:36 AM Sourabh Hegde <hrsourabh011@...> wrote:

Hello All,

I have a simple recipe in which a binary is installed to /usr/bin/. Now, I want to establish a symlink to same binary also. I am using hardknott release

do_install () {
install -d ${D}${bindir}/
install -m 0755 ${WORKDIR}/ ${D}${bindir}/test
lnr ${D}/usr/bin/test ${D}/usr/bin/test-x

Is this the correct approach? Or is there any better method?
Looks ok perhaps you want to double check using lnr we have dropped
its usage in master but I am not sure if hardknott needs it or not. I
would simily use

ln -sf test ${D}/usr/bin/test-x

and avoid using the lnr wrapper.

Join { to automatically receive all group messages.