Due to this recipe being added there are two providers for
qemu-helper-native, but by default one is never selected. This generates
a message during the build that informs the user to select a provider.
This is unnecessary as the only machines that care about setting the
provider is currently zcu102-zynqmp due to its requirement for
qemu-xilinx all other qemu machines should be using the
qemu-helper-native recipe and non-qemu machines don't use the recipe.

To prevent the message, only make the qemu-xilinx-helper-native recipe
available when it is selected as the preferred provider otherwise skip
it.

Signed-off-by: Nathan Rossi <[email protected]>
---
 recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb 
b/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
index f04be9602e..f48a8d40a0 100644
--- a/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
+++ b/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
@@ -1,9 +1,14 @@
 
+python () {
+    if d.getVar("PREFERRED_PROVIDER_qemu-helper-native") != d.getVar("PN"):
+        raise bb.parse.SkipRecipe("Set qemu-helper-native provider to use this 
recipe")
+}
+
 def get_filespath_extra(d, subpath):
-       metaroot = next((p for p in d.getVar('BBPATH').split(':') if 
os.path.basename(p) == 'meta'), None)
-       if metaroot:
-               return os.path.join(metaroot, subpath) + ":"
-       return ""
+    metaroot = next((p for p in d.getVar('BBPATH').split(':') if 
os.path.basename(p) == 'meta'), None)
+    if metaroot:
+        return os.path.join(metaroot, subpath) + ":"
+    return ""
 
 # TODO: improve this, since it is very hacky that this recipe need to build 
tunctl.
 # include the existing qemu-helper-native
-- 
2.11.0

-- 
_______________________________________________
meta-xilinx mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-xilinx

Reply via email to