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-23 23:05:50 +0000
commit41dbb14cb9e1815b21e82a104b0a771ad1160238 (patch)
tree722eb79887d34258908a85866cdc2c09db5f2440
parent13d7119cdff89407b6f33f9729b15b5d54d34843 (diff)
downloadpoky-41dbb14cb9e1815b21e82a104b0a771ad1160238.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> (From OE-Core rev: 750f4e17f63cf957076c13c53139ddaab1617597) Signed-off-by: Alex Stewart <alex.stewart@ni.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit e2893fa692a6e91eee09fc04c8c03fe27c718a58) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/lsof/lsof_4.94.0.bb9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-extended/lsof/lsof_4.94.0.bb b/meta/recipes-extended/lsof/lsof_4.94.0.bb
index c2b8bc839b..62f42975af 100644
--- a/meta/recipes-extended/lsof/lsof_4.94.0.bb
+++ b/meta/recipes-extended/lsof/lsof_4.94.0.bb
@@ -19,6 +19,15 @@ SRCREV = "005e014e1abdadb2493d8b3ce87b37a2c0a2351d"
19 19
20S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
21 21
22
23inherit update-alternatives
24
25ALTERNATIVE_${PN} = "lsof"
26ALTERNATIVE_LINK_NAME[lsof] = "${sbindir}/lsof"
27# Make our priority higher than busybox
28ALTERNATIVE_PRIORITY = "100"
29
30
22export LSOF_INCLUDE = "${STAGING_INCDIR}" 31export LSOF_INCLUDE = "${STAGING_INCDIR}"
23 32
24do_configure () { 33do_configure () {