From 9a771efc71c505e7d325ea1a47468c80946f5fa3 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Mon, 3 Feb 2025 15:23:49 -0700 Subject: meta-xilinx-core: qemu: Fix preferred provider processing When we've disabled a recipe due to preferred provider status, we do NOT want to cache the result. If the result is cached, and the user adjusts the value it may not be recognized requiring the user to delete the cache directory as a workaround. Signed-off-by: Mark Hatle --- meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc | 4 ++-- meta-xilinx-core/recipes-devtools/qemu/qemu-native-alt.inc | 2 +- meta-xilinx-core/recipes-devtools/qemu/qemu-system-native-alt.inc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc index c18a5326..b8a44470 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc @@ -7,11 +7,11 @@ python () { if bb.data.inherits_class('nativesdk', d): if (not d.getVar("PREFERRED_PROVIDER_nativesdk-qemu") and "nativesdk-qemu" != d.getVar("PN")) or \ (d.getVar("PREFERRED_PROVIDER_nativesdk-qemu") and d.getVar("PREFERRED_PROVIDER_nativesdk-qemu") != d.getVar("PN")): - d.delVar("BB_DONT_CACHE") + d.setVar('BB_DONT_CACHE', '1') raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_nativesdk-qemu to %s to enable it" % (d.getVar("PN"))) elif (not d.getVar("PREFERRED_PROVIDER_qemu") and "qemu" != d.getVar("PN")) or \ (d.getVar("PREFERRED_PROVIDER_qemu") and d.getVar("PREFERRED_PROVIDER_qemu") != d.getVar("PN")): - d.delVar("BB_DONT_CACHE") + d.setVar('BB_DONT_CACHE', '1') raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_qemu to %s to enable it" % (d.getVar("PN"))) if (d.getVar('BPN') != 'qemu'): diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-native-alt.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-alt.inc index 60c79542..7acd6add 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-native-alt.inc +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-alt.inc @@ -6,7 +6,7 @@ PROVIDES += "qemu-native" python () { if (not d.getVar("PREFERRED_PROVIDER_qemu-native") and "qemu-native" != d.getVar("PN")) or \ (d.getVar("PREFERRED_PROVIDER_qemu-native") and d.getVar("PREFERRED_PROVIDER_qemu-native") != d.getVar("PN")): - d.delVar("BB_DONT_CACHE") + d.setVar('BB_DONT_CACHE', '1') raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_qemu-native to %s to enable it" % (d.getVar("PN"))) } diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-system-native-alt.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-system-native-alt.inc index 42592c58..de1f60ac 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-system-native-alt.inc +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-system-native-alt.inc @@ -6,7 +6,7 @@ PROVIDES += "qemu-system-native" python () { if (not d.getVar("PREFERRED_PROVIDER_qemu-system-native") and "qemu-system-native" != d.getVar("PN")) or \ (d.getVar("PREFERRED_PROVIDER_qemu-system-native") and d.getVar("PREFERRED_PROVIDER_qemu-system-native") != d.getVar("PN")): - d.delVar("BB_DONT_CACHE") + d.setVar('BB_DONT_CACHE', '1') raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_qemu-system-native to %s to enable it" % (d.getVar("PN"))) } -- cgit v1.2.3-54-g00ecf