Skip to contentSkip to conversation

frr: use update-alternatives for ietf-interfaces.yang

PATCH New [email protected] 1 participant 2 messages Jan 12, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 frr: use update-alternatives for ietf-interfaces.yang

From: Wang Mingyu <[email protected]>

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.

---
 meta-networking/recipes-protocols/frr/frr_9.1.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta-networking/recipes-protocols/frr/frr_9.1.bb +5 -0
index 9db6710d9..5cc19d09d 100644
@@ -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
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 libsmi: use update-alternatives for ietf-interfaces.yang

From: Wang Mingyu <[email protected]>

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

frr also uses the doc 'ietf-interfaces.yang'.
frr has a priority of 100.

---
 meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-support/libsmi/libsmi_0.5.0.bb +4 -1
index 07e2e2941..5b1d021e3 100644
@@ -16,7 +16,10 @@ SRC_URI[sha256sum] = "f21accdadb1bb328ea3f8a13fc34d715baac6e2db66065898346322c72
 
 DEPENDS += "bison-native flex-native wget-native gawk-native"
 
-inherit autotools-brokensep
+inherit autotools-brokensep update-alternatives
+ALTERNATIVE_PRIORITY = "50"
+ALTERNATIVE:${PN}-yang = "ietf-interfaces "
+ALTERNATIVE_LINK_NAME[ietf-interfaces] = "${datadir}/yang/ietf-interfaces.yang"
 
 EXTRA_OECONF = "ac_cv_path_SH=/bin/sh"
 
Signature · 1 line
2.34.1