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-06 15:23:18 +0000 |
commit | a56db5d877505d8f17409e13dd11edf1a1ee7b7f (patch) | |
tree | 4d55aaf1b65ebb13ab0e09d696d6a33e11919e53 /meta/recipes-extended | |
parent | 8bd4aa73db774aba0ca22aa714a819b1ae68d654 (diff) | |
download | poky-a56db5d877505d8f17409e13dd11edf1a1ee7b7f.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: e2893fa692a6e91eee09fc04c8c03fe27c718a58)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/lsof/lsof_4.96.4.bb | 9 |
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" | |||
12 | 12 | ||
13 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
14 | 14 | ||
15 | |||
16 | inherit update-alternatives | ||
17 | |||
18 | ALTERNATIVE_${PN} = "lsof" | ||
19 | ALTERNATIVE_LINK_NAME[lsof] = "${sbindir}/lsof" | ||
20 | # Make our priority higher than busybox | ||
21 | ALTERNATIVE_PRIORITY = "100" | ||
22 | |||
23 | |||
15 | export LSOF_INCLUDE = "${STAGING_INCDIR}" | 24 | export LSOF_INCLUDE = "${STAGING_INCDIR}" |
16 | 25 | ||
17 | do_configure () { | 26 | do_configure () { |