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

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>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Wang Mingyu 2024-01-12 10:50:23 +08:00 committed by Khem Raj
parent 098dc606f9
commit 4ea46a31b9
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -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