diff options
author | Alex Stewart <alex.stewart@ni.com> | 2022-12-02 14:59:10 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-23 23:05:57 +0000 |
commit | 30715ff8c2bbe2f37109a9d0e061b616f68a8da2 (patch) | |
tree | bffb1fddbfac028c727f736c820b1fc585cde879 | |
parent | 091439a825e79b4c9239c57cddf6d25a5112820a (diff) | |
download | poky-30715ff8c2bbe2f37109a9d0e061b616f68a8da2.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: d2713d7b93401ffb2c6f9f61ad6928ef09aa8702)
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.95.0.bb | 9 |
1 files changed, 9 insertions, 0 deletions
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" | |||
19 | 19 | ||
20 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
21 | 21 | ||
22 | |||
23 | inherit update-alternatives | ||
24 | |||
25 | ALTERNATIVE_${PN} = "lsof" | ||
26 | ALTERNATIVE_LINK_NAME[lsof] = "${sbindir}/lsof" | ||
27 | # Make our priority higher than busybox | ||
28 | ALTERNATIVE_PRIORITY = "100" | ||
29 | |||
30 | |||
22 | export LSOF_INCLUDE = "${STAGING_INCDIR}" | 31 | export LSOF_INCLUDE = "${STAGING_INCDIR}" |
23 | 32 | ||
24 | do_configure () { | 33 | do_configure () { |