From d2713d7b93401ffb2c6f9f61ad6928ef09aa8702 Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Fri, 2 Dec 2022 14:59:10 -0600 Subject: lsof: add update-alternatives logic Some distributions (NI LinuxRT) provide both busybox-lsof and full-featured lsof implementations. When users install the full-featured lsof package, the full-binary fails to replace the bbox-binary in PATH, because `lsof` contains no update-alternatives logic. Inherit the update-alternatives bbclass and assert that the full-featured lsof package has higher priority than the busybox implementation. Co-Authored-By: Kyle Roeschley Signed-off-by: Alex Stewart Signed-off-by: Alexandre Belloni (cherry picked from commit e2893fa692a6e91eee09fc04c8c03fe27c718a58) Signed-off-by: Steve Sakoman --- meta/recipes-extended/lsof/lsof_4.95.0.bb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta/recipes-extended/lsof/lsof_4.95.0.bb b/meta/recipes-extended/lsof/lsof_4.95.0.bb index f380de0b6b..80128369ec 100644 --- a/meta/recipes-extended/lsof/lsof_4.95.0.bb +++ b/meta/recipes-extended/lsof/lsof_4.95.0.bb @@ -19,6 +19,15 @@ SRCREV = "67d8c828e7bdc01ba93f8ff79765dd424da0c9d7" S = "${WORKDIR}/git" + +inherit update-alternatives + +ALTERNATIVE_${PN} = "lsof" +ALTERNATIVE_LINK_NAME[lsof] = "${sbindir}/lsof" +# Make our priority higher than busybox +ALTERNATIVE_PRIORITY = "100" + + export LSOF_INCLUDE = "${STAGING_INCDIR}" do_configure () { -- cgit 1.2.3-korg