android-tools-conf: fix android-tools build-deps warning

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 <dmitry.baryshkov@linaro.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Dmitry Baryshkov 2020-12-24 13:31:24 +03:00 committed by Khem Raj
parent f371896070
commit 3935fcbc0b

View File

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