diff mbox series

[2/3] opkg: add deprecation warning for internal solver

Message ID 20240208175020.1017580-2-alex.stewart@ni.com
State Accepted, archived
Commit c8405b86c6c3f9054810914105de5d70c4b7800b
Headers show
Series [1/3] opkg: upgrade to 0.6.3 | expand

Commit Message

Alex Stewart Feb. 8, 2024, 5:50 p.m. UTC
The opkg internal sat-solver is marked for deprecation in a future
release.

Add a recipe QA check to warn users who have the internal solver
configured.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
---
 meta/recipes-devtools/opkg/opkg_0.6.3.bb | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/opkg/opkg_0.6.3.bb b/meta/recipes-devtools/opkg/opkg_0.6.3.bb
index 1f15c44e3e..9592ffc5d6 100644
--- a/meta/recipes-devtools/opkg/opkg_0.6.3.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.6.3.bb
@@ -61,6 +61,15 @@  do_install_ptest () {
 	sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
 }
 
+WARN_QA:append = " internal-solver-deprecation"
+QARECIPETEST[internal-solver-deprecation] = "qa_check_solver_deprecation"
+def qa_check_solver_deprecation (pn, d, messages):
+    pkgconfig = (d.getVar("PACKAGECONFIG") or "").split()
+
+    if "libsolv" not in pkgconfig:
+        oe.qa.handle_error("internal-solver-deprecation", "The opkg internal solver will be deprecated in future opkg releases. Consider enabling \"libsolv\" in PACKAGECONFIG.", d)
+
+
 RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
 RDEPENDS:${PN}:class-native = ""
 RDEPENDS:${PN}:class-nativesdk = ""