From 7de0bbbbaa5064dbb72db769060a7a93ccf2d654 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 30 Aug 2020 13:51:23 -0700 Subject: canutils: Use update-alternatives canutils provides applications which conflict with can-utils recipe. update-alternatives helps fix this when both are installed Signed-off-by: Khem Raj --- meta-oe/recipes-extended/socketcan/can-utils_git.bb | 6 +++++- meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'meta-oe') diff --git a/meta-oe/recipes-extended/socketcan/can-utils_git.bb b/meta-oe/recipes-extended/socketcan/can-utils_git.bb index 519368817f..e3ad04f598 100644 --- a/meta-oe/recipes-extended/socketcan/can-utils_git.bb +++ b/meta-oe/recipes-extended/socketcan/can-utils_git.bb @@ -12,4 +12,8 @@ PV = "2020.02.04" S = "${WORKDIR}/git" -inherit autotools pkgconfig +inherit autotools pkgconfig update-alternatives + +ALTERNATIVE_${PN} = "candump cansend" +ALTERNATIVE_LINK_NAME[candump] = "${bindir}/candump" +ALTERNATIVE_LINK_NAME[cansend] = "${bindir}/cansend" diff --git a/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb b/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb index e1508af857..aaa2653483 100644 --- a/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb +++ b/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb @@ -12,9 +12,16 @@ SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=git \ file://0001-canutils-candump-Add-error-frame-s-handling.patch \ " +inherit update-alternatives + S = "${WORKDIR}/git" inherit autotools pkgconfig # Busybox ip doesn't support can interface configuration, use the real thing RDEPENDS_${PN} += "iproute2" + +ALTERNATIVE_PRIORITY = "90" +ALTERNATIVE_${PN} = "candump cansend" +ALTERNATIVE_LINK_NAME[candump] = "${bindir}/candump" +ALTERNATIVE_LINK_NAME[cansend] = "${bindir}/cansend" -- cgit 1.2.3-korg