diff mbox series

[scarthgap,2/2] libyang: suppress multilib error

Message ID 20251207170309.1924061-2-denis@denix.org
State New
Headers show
Series [scarthgap,1/2] libyang: remove unused files | expand

Commit Message

Denys Dmytriyenko Dec. 7, 2025, 5:03 p.m. UTC
From: Denys Dmytriyenko <denys@konsulko.com>

Version 2.x of libyang had config.h file that needs to be processed
for multilib, while newer 3.x renamed the file to ly_config.h. As
meta-oe/scarthgap expects the old config.h file for multilib, which
cannot be disabled, let's duplicate the new ly_config.h as config.h
to avoid the error.

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
---
 .../recipes-extended/sysrepo/libyang-arago.inc        | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/meta-arago-extras/recipes-extended/sysrepo/libyang-arago.inc b/meta-arago-extras/recipes-extended/sysrepo/libyang-arago.inc
index b76701a8..9744ea3a 100644
--- a/meta-arago-extras/recipes-extended/sysrepo/libyang-arago.inc
+++ b/meta-arago-extras/recipes-extended/sysrepo/libyang-arago.inc
@@ -4,6 +4,17 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=9bb3d334294e8719f41c531e28a9a697"
 
 SRCREV = "03e294d83b610f89e8ba7b2156a80dc0ad534443"
 
+# 2.x still uses config.h and meta-oe/scarthgap tries
+# to process it for multilib, which cannot be disabled
+# and results in an error. Just duplicate the actual
+# ly_config.h to suppress the error.
+do_install:prepend () {
+    install -d ${D}${includedir}/libyang
+    install -m 644 libyang/ly_config.h ${D}${includedir}/libyang/config.h
+}
+
+# 3.x now comes with ly_config.h, so process it here
+# for multilib
 do_install:append () {
     oe_multilib_header  libyang/ly_config.h
 }