diff mbox series

[meta-networking,1/2] frr: use update-alternatives for ietf-interfaces.yang

Message ID 1705027824-28800-1-git-send-email-wangmy@fujitsu.com
State Accepted
Headers show
Series [meta-networking,1/2] frr: use update-alternatives for ietf-interfaces.yang | expand

Commit Message

Mingyu Wang (Fujitsu) Jan. 12, 2024, 2:50 a.m. UTC
From: Wang Mingyu <wangmy@fujitsu.com>

Error: Transaction test error:
  file /usr/share/yang/ietf-interfaces.yang conflicts between attempted installs of libsmi-yang-0.5.0-r0.cortexa57 and frr-9.1-r1.cortexa57

libsmi also uses the doc 'ietf-interfaces.yang'.
libsmi has a priority of 50.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
---
 meta-networking/recipes-protocols/frr/frr_9.1.bb | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/meta-networking/recipes-protocols/frr/frr_9.1.bb b/meta-networking/recipes-protocols/frr/frr_9.1.bb
index 9db6710d9..5cc19d09d 100644
--- a/meta-networking/recipes-protocols/frr/frr_9.1.bb
+++ b/meta-networking/recipes-protocols/frr/frr_9.1.bb
@@ -74,6 +74,11 @@  SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE:${PN} = "frr.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE:${PN} = " ietf-interfaces "
+ALTERNATIVE_LINK_NAME[ietf-interfaces] = "${datadir}/yang/ietf-interfaces.yang"
 do_compile:prepend () {
    sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' \
           -e 's#${RECIPE_SYSROOT}##g' ${S}/lib/version.h