If PREFERRED_PROVIDER_android-tool-conf is set, build-deps checker will
incorrectly resolve android-tools-conf runtime dependency to
android-tools-conf recipe rather than the selected recipe. To fix the
following warning, make android-tools-conf recipe raise SkipRecipe if it
is not the preferred android-tools-conf provider.

WARNING: android-tools-5.1.1.r37-r0 do_package_qa: QA Issue: android-tools-adbd 
rdepends on android-tools-conf, but it isn't a build dependency, missing 
android-tools-conf in DEPENDS or PACKAGECONFIG? [build-deps]

Signed-off-by: Dmitry Baryshkov <[email protected]>
---
 .../android-tools/android-tools-conf_1.0.bb                | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb 
b/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb
index af98f92f05e2..34b1a9bdd289 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb
+++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb
@@ -11,3 +11,10 @@ do_install() {
     install -d ${D}${bindir}
     install -m 0755 ${WORKDIR}/android-gadget-setup ${D}${bindir}
 }
+
+python () {
+    pn = d.getVar('PN')
+    profprov = d.getVar("PREFERRED_PROVIDER_" + pn)
+    if profprov and pn != profprov:
+        raise bb.parse.SkipRecipe("PREFERRED_PROVIDER_%s set to %s, not %s" % 
(pn, profprov, pn))
+}
-- 
2.29.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#88380): 
https://lists.openembedded.org/g/openembedded-devel/message/88380
Mute This Topic: https://lists.openembedded.org/mt/79199665/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to