summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Stewart <alex.stewart@ni.com>2022-12-02 14:59:10 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-06 15:23:13 +0000
commite2893fa692a6e91eee09fc04c8c03fe27c718a58 (patch)
treeffaf629dcf61058045ae5c0fbc9b98aec31f3ba6
parent451fe4a067432b432b9cd38d2fc78072f6ce5421 (diff)
downloadopenembedded-core-e2893fa692a6e91eee09fc04c8c03fe27c718a58.tar.gz
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 <kyle.roeschley@ni.com> Signed-off-by: Alex Stewart <alex.stewart@ni.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--meta/recipes-extended/lsof/lsof_4.96.4.bb9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-extended/lsof/lsof_4.96.4.bb b/meta/recipes-extended/lsof/lsof_4.96.4.bb
index bdd883d0ce..11de535a0f 100644
--- a/meta/recipes-extended/lsof/lsof_4.96.4.bb
+++ b/meta/recipes-extended/lsof/lsof_4.96.4.bb
@@ -12,6 +12,15 @@ SRCREV = "669c33a253e414feb60fbbcf2984c25dc413cd75"
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 () {